Class: StandardId::Api::Oauth::TokensController

Inherits:
BaseController show all
Defined in:
app/controllers/standard_id/api/oauth/tokens_controller.rb

Constant Summary collapse

FLOW_STRATEGIES =
{
  "client_credentials" => StandardId::Oauth::ClientCredentialsFlow,
  "authorization_code" => StandardId::Oauth::AuthorizationCodeFlow,
  "password" => StandardId::Oauth::PasswordFlow,
  "refresh_token" => StandardId::Oauth::RefreshTokenFlow,
  "passwordless_otp" => StandardId::Oauth::PasswordlessOtpFlow
}.freeze

Constants included from RateLimitHandling

RateLimitHandling::RATE_LIMIT_STORE

Instance Method Summary collapse

Methods included from ControllerPolicy

all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!

Instance Method Details

#createObject



25
26
27
28
# File 'app/controllers/standard_id/api/oauth/tokens_controller.rb', line 25

def create
  response_data = flow_strategy_class.new(flow_strategy_params, request).execute
  render json: response_data, status: :ok
end