I have a rails application which uses Device and Cancan for authentication. When I tried to sign in through my Rails Web view it works fine, but when I tried in Rest client I am getting an error. Is there any token I need to pass while signing in?
Sign in details..
http://localhost:3001/users/sign_in
{
"username" : "abcd",
"password" : "abcd"
}
In Rails Web View
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"V", "authenticity_token"=>"A6GbMQxnQO6ELz/QM3yRIDYM5xfFi
Whn6nTLodfghYtU=", "user"=>{"username"=>"admin", "password"=>"[FILTERED]"}, "comm
it"=>"Sign in"}
There is no other parameters other than user credentials are posted through Web view.
How to solve this through REST CLIENT?
Thanks in advance..
Please follow the link https://github.com/applicake/doorkeeper/wiki/Using-Resource-Owner-Password-Credentials-flow
Before that you need to register your application to get the Client_id and secret_id
in Device Registration path is :
http://localhost:3000/oauth/applications/newOnce You get the access tocken you can access the resources by passing the access tocken as query string along with resource URL
Eg :
http://localhost:3000/users?access_token=<!----access_token----!>