1

i have web and mobile application . mobile application use web service that are build in php codeigniter with Cross-Site Request Forgery (CSRF) enabled.

So my question is how to access web service ? it always return a message

<h1>An Error Was Encountered</h1>
<p>The action you have requested is not allowed.</p>
Dileep Kheni
  • 882
  • 1
  • 7
  • 29

1 Answers1

0

Have your requesting page include at least one form input, which is usually hidden. This will ensure that codeigniter will send a token with the request.

see this Question and answer.

Community
  • 1
  • 1
Loopo
  • 2,204
  • 2
  • 28
  • 45
  • yes that's right . but my question is how to use it within web service that call from mobile application . – Dileep Kheni Feb 10 '14 at 04:06
  • How are you calling the service? If you're using something like ajax, you can include the token in your call. See this answer: http://stackoverflow.com/a/10897074/32763 – Loopo Feb 10 '14 at 13:54