Class: Simple::OAuth2::Configuration

Inherits:
Object
  • Object
show all
Includes:
ClassAccessors
Defined in:
lib/simple_oauth2/configuration.rb

Overview

Simple::OAuth2 configuration class Contains default or customized options that would be used in OAuth2 endpoints and helpers

Constant Summary collapse

SUPPORTED_GRANT_TYPES =
%w(password).freeze
DEFAULT_TOKEN_LIFETIME =
7200
DEFAULT_CODE_LIFETIME =
1800
DEFAULT_REALM =
'OAuth 2.0'.freeze
DEFAULT_CLIENT_CLASS =
'Client'.freeze
DEFAULT_ACCESS_TOKEN_CLASS =
'AccessToken'.freeze
DEFAULT_RESOURCE_OWNER_CLASS =
'User'.freeze
DEFAULT_ACCESS_GRANT_CLASS =
'AccessGrant'.freeze
DEFAULT_ISSUE_REFRESH_TOKEN =
false

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassAccessors

#access_grant_class, #access_token_class, #client_class, #resource_owner_class, #token_generator

Constructor Details

#initializeConfiguration


24
25
26
# File 'lib/simple_oauth2/configuration.rb', line 24

def initialize
  setup!
end

Instance Attribute Details

#access_grant_class_nameObject

Returns the value of attribute access_grant_class_name


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def access_grant_class_name
  @access_grant_class_name
end

#access_token_class_nameObject

Returns the value of attribute access_token_class_name


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def access_token_class_name
  @access_token_class_name
end

#access_token_lifetimeObject

Returns the value of attribute access_token_lifetime


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def access_token_lifetime
  @access_token_lifetime
end

#allowed_grant_typesObject

Returns the value of attribute allowed_grant_types


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def allowed_grant_types
  @allowed_grant_types
end

#authorization_code_lifetimeObject

Returns the value of attribute authorization_code_lifetime


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def authorization_code_lifetime
  @authorization_code_lifetime
end

#client_class_nameObject

Returns the value of attribute client_class_name


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def client_class_name
  @client_class_name
end

#issue_refresh_tokenObject

Returns the value of attribute issue_refresh_token


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def issue_refresh_token
  @issue_refresh_token
end

#realmObject

Returns the value of attribute realm


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def realm
  @realm
end

#resource_owner_class_nameObject

Returns the value of attribute resource_owner_class_name


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def resource_owner_class_name
  @resource_owner_class_name
end

#token_generator_class_nameObject

Returns the value of attribute token_generator_class_name


18
19
20
# File 'lib/simple_oauth2/configuration.rb', line 18

def token_generator_class_name
  @token_generator_class_name
end