Class: Iron::Oauth::TokensController

Inherits:
ActionController::API
  • Object
show all
Includes:
BoundedRequestBody
Defined in:
app/controllers/iron/oauth/tokens_controller.rb

Constant Summary collapse

PKCE_VERIFIER =
/\A[A-Za-z0-9\-._~]{43,128}\z/

Instance Method Summary collapse

Methods included from BoundedRequestBody

#process_action

Instance Method Details

#createObject



12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/iron/oauth/tokens_controller.rb', line 12

def create
  case params[:grant_type]
  when "authorization_code"
    issue_from_authorization_code
  when "refresh_token"
    issue_from_refresh_token
  else
    render_error("unsupported_grant_type")
  end
end