class Devise::Strategies::AccessTokenAuthenticatable
Public Instance Methods
authenticate!()
click to toggle source
# File lib/devise/strategies/access_token_authenticatable.rb, line 6 def authenticate! resource, token = mapping.to.find_for_access_token_authentication(authentication_hash) return fail(:invalid_token) unless resource if validate(resource) resource.after_token_authentication(token) success!(resource) end end
decode_credentials()
click to toggle source
# File lib/devise/strategies/access_token_authenticatable.rb, line 20 def decode_credentials return nil unless request.authorization && request.authorization =~ /^Bearer (.*)/m return $1 end
http_auth_hash()
click to toggle source
# File lib/devise/strategies/access_token_authenticatable.rb, line 16 def http_auth_hash { authentication_keys.first => decode_credentials } end