Class: Grape::OAuth2::Generators::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_oauth2/generators/base.rb

Overview

Base class for Grape::OAuth2 generators. Grape::OAuth2 generators processes the requests and generates responses with Access Token or Authorization Code.

Direct Known Subclasses

Authorization, Token

Class Method Summary collapse

Class Method Details

.allowed_grantsArray

Allowed grant types from the Grape::OAuth2 configuration.

Returns:

  • (Array)

    allowed grant types



14
15
16
# File 'lib/grape_oauth2/generators/base.rb', line 14

def allowed_grants
  config.allowed_grant_types
end

.configObject

Short getter for Grape::OAuth2 configuration.



19
20
21
# File 'lib/grape_oauth2/generators/base.rb', line 19

def config
  Grape::OAuth2.config
end