method
authenticate_or_request_with_http_token
rails latest stable - Class:
ActionController::HttpAuthentication::Token::ControllerMethods
authenticate_or_request_with_http_token(realm = "Application", message = nil, &login_procedure)public
Authenticate using an HTTP Bearer token, or otherwise render an HTTP header requesting the client to send a Bearer token. For the authentication to be considered successful, login_procedure should return a non-nil value. Typically, the authenticated user is returned.
See ActionController::HttpAuthentication::Token for example usage.
1Note
Article
Here is artice about this method http://blog.envylabs.com/post/75521798481/token-based-authentication-in-rails