Class: Devise::Strategies::Oauth2FacebookGrantTypeStrategy
Instance Method Summary
collapse
#authenticate!, #oauth_error!, #valid?
Instance Method Details
#authenticate_grant_type(client) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/devise/oauth2_providable/strategies/oauth2_facebook_grant_type_strategy.rb', line 10
def authenticate_grant_type(client)
resource = mapping.to.find_for_authentication(:uid => params[:uid], :provider => 'facebook')
if validate(resource) { params[:token] == resource.fb_token }
success! resource
else
oauth_error! :invalid_grant, 'invalid facebook authentication request'
end
end
|
#grant_type ⇒ Object
6
7
8
|
# File 'lib/devise/oauth2_providable/strategies/oauth2_facebook_grant_type_strategy.rb', line 6
def grant_type
'facebook'
end
|