Class: Simple::OAuth2::Strategies::ClientCredentials
- Defined in:
- lib/simple_oauth2/strategies/client_credentials.rb
Overview
ClientCredentials strategy class. Processes request and respond with Access Token
Class Method Summary collapse
-
.process(request) ⇒ Object
Processes ClientCredentials request.
Methods inherited from Base
authenticate_access_grant, authenticate_client, authenticate_resource_owner, authorization_verify_client!, expose_to_bearer_token, token_verify_client!
Class Method Details
.process(request) ⇒ Object
Processes ClientCredentials request
9 10 11 12 13 14 15 16 |
# File 'lib/simple_oauth2/strategies/client_credentials.rb', line 9 def process(request) client = authenticate_client(request) || request.invalid_client! resource_owner = authenticate_resource_owner(client, request) || request.invalid_grant! token = config.access_token_class.create_for(client, resource_owner, request.scope.join(',')) expose_to_bearer_token(token) end |