Class: Devise::Strategies::Oauth2AuthorizationCodeGrantTypeStrategy
Instance Method Summary
collapse
#authenticate!, #oauth_error!, #valid?
Instance Method Details
#authenticate_grant_type(client) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/devise/oauth2_providable/strategies/oauth2_authorization_code_grant_type_strategy.rb', line 10
def authenticate_grant_type(client)
if code = client.authorization_codes.find_by_token(params[:code])
success! code.user
else
oauth_error! :invalid_grant, 'invalid authorization code request'
end
end
|
#grant_type ⇒ Object
6
7
8
|
# File 'lib/devise/oauth2_providable/strategies/oauth2_authorization_code_grant_type_strategy.rb', line 6
def grant_type
'authorization_code'
end
|