I am building an API using Rails 3.2.8 and I am using token based authentication.
In the beginning of all controller files I have this:
before_filter :verify_authenticity_token
This works very nice when I pass a valid token (user is logged in) but if I pass an invalid token it does nothing. I was expecting it to say unauthorized or something and stop all further processing of the controller file.
How can I do this?
Thankful for all help!
May be this helps: