Hi,
I am trying to post some data to our existing Rails application from a
seperate java application. I am running into the problem of not having
a valid authenticity token. How can I get around this?
The java app is not totally under our control so I don't think I can
add stuff like session handling to it (and I shouldn't have to!).
isn't that a security hole?
Is there a way around this with some sort of authentication on the
method? (http basic for instance)?
Could I do what you suggest but then also code the method to use that?
isn't that a security hole?
Is there a way around this with some sort of authentication on the
method? (http basic for instance)?
Could I do what you suggest but then also code the method to use that?
You're not going to want to have crsf tokens and what not for an api.
It doesn't make any sense. Use http basic, restrict it to requests
from the internal network, use api tokens etc... etc...
The world is your oyster.
request forgery protection is to protect against things like cross-site
scripting.
For an API, you should probably be protecting requests via
an authentication method which could include http basic authentication,
you could also use an API token where a unique (to the user of the API) token is sent with every
request.