method
    
    authenticate_or_request_with_http_token
  
      v4.2.7 - 
      Show latest stable
 - 
    2 notes - 
    Class: ActionController::HttpAuthentication::Token::ControllerMethods
    
  
  
- 1.0.0
 - 1.1.6
 - 1.2.6
 - 2.0.3
 - 2.1.0
 - 2.2.1
 - 2.3.8
 - 3.0.0 (0)
 - 3.0.9 (0)
 - 3.1.0 (0)
 - 3.2.1 (0)
 - 3.2.8 (0)
 - 3.2.13 (0)
 - 4.0.2 (0)
 - 4.1.8 (0)
 - 4.2.1 (0)
 - 4.2.7 (0)
 - 4.2.9 (0)
 - 5.0.0.1 (0)
 - 5.1.7 (0)
 - 5.2.3 (0)
 - 6.0.0 (0)
 - 6.1.3.1 (0)
 - 6.1.7.7 (0)
 - 7.0.0 (0)
 - 7.1.3.2 (38)
 - 7.1.3.4 (0)
 - What's this?
 
  
    
      Register or 
      log in
      to add new notes.
  
  
  
  
      
    
 Primus -  
    January  8, 2014 - (v3.0.0 - v3.2.13)
    
  
  
  
       
  
  
  
  
      
    
 woto77 -  
    February 21, 2014 
    
  
  
  
       
  
  
  
          
    
    2 thanks
     
  
  
  An Example for using it.
Call it in a before filter in your Base or Application Controller.
before_filter :authenticate_through_api_client
def authenticate_through_api_client
# this block should return true or false authenticate_or_request_with_http_token |token,other_options| Apiclient.find_by_client_key(token).present? end
end
# Sample request type: it expects a token in headers as
Authorization:Token token=“your_token_goes_here”
Authorization is the key and Token token=“” is value
    
    0 thanks
     
  
  
  Article
Here is artice about this method http://blog.envylabs.com/post/75521798481/token-based-authentication-in-rails

  
  
  
    