Class: Devise::Oauth::AccessTokensController

Inherits:
ApplicationController
  • Object
show all
Includes:
Helpers
Defined in:
app/controllers/devise/oauth/access_tokens_controller.rb

Constant Summary collapse

@@flows =
{
  ## section 4.1.3 (authorization code flow)
  authorization_code: [
    :find_auth_by_code,
    :normalize_scope,
    :access_blocked?,
    :create_token_from_auth
  ],
   ## section 4.3.2 (Resource Owner Password Credentials flow)
  password: [
    :authenticate_resource_owner,
    :normalize_scope,
    :access_blocked?,
    :create_token
  ],
  # section 6.0 (refresh token)
  refresh_token: [
    :find_refresh_token,
    :normalize_scope,
    :access_blocked?,
    :create_token_from_refresh
  ]
}

Instance Method Summary collapse

Methods included from Helpers

#access_blocked?, #client_blocked?, #normalize_scope

Instance Method Details

#createObject



38
39
40
41
# File 'app/controllers/devise/oauth/access_tokens_controller.rb', line 38

def create
  render json: @token_response
  @authorization.used! if @authorization
end

#destroyObject



43
44
# File 'app/controllers/devise/oauth/access_tokens_controller.rb', line 43

def destroy
end