Class: OIDCProvider::AuthorizationsController

Inherits:
ApplicationController show all
Includes:
Concerns::ConnectEndpoint
Defined in:
app/controllers/oidc_provider/authorizations_controller.rb

Instance Method Summary collapse

Methods included from Concerns::ConnectEndpoint

#handle_oauth_error!, #oauth_error, #oauth_request, #oauth_response, #require_oauth_request

Methods inherited from ApplicationController

#current_token, #oidc_current_account, #require_access_token, #require_authentication, #unauthenticate!

Instance Method Details

#createObject



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/oidc_provider/authorizations_controller.rb', line 13

def create
  Rails.logger.info "scopes: #{requested_scopes}"

  authorization = build_authorization_with(requested_scopes)

  oauth_response.code = authorization.code
  oauth_response.redirect_uri = @redirect_uri
  oauth_response.approve!
  redirect_to oauth_response.location

  # If we ever need to support denied authorizations that is done by:
  # oauth_request.access_denied!
end