Class: Doorkeeper::Config

Inherits:
Object
  • Object
show all
Extended by:
Option
Defined in:
lib/doorkeeper/config.rb

Defined Under Namespace

Modules: Option Classes: Builder

Instance Method Summary collapse

Methods included from Option

extended, option

Instance Method Details

#access_token_methodsObject



190
191
192
# File 'lib/doorkeeper/config.rb', line 190

def access_token_methods
  @access_token_methods ||= [:from_bearer_authorization, :from_access_token_param, :from_bearer_param]
end

#client_credentials_methodsObject



186
187
188
# File 'lib/doorkeeper/config.rb', line 186

def client_credentials_methods
  @client_credentials ||= [:from_basic, :from_params]
end

#confirm_application_owner?Boolean

Returns:

  • (Boolean)


166
167
168
# File 'lib/doorkeeper/config.rb', line 166

def confirm_application_owner?
  !!@confirm_application_owner
end

#default_scopesObject



170
171
172
# File 'lib/doorkeeper/config.rb', line 170

def default_scopes
  @default_scopes ||= Doorkeeper::OAuth::Scopes.new
end

#enable_application_owner?Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/doorkeeper/config.rb', line 162

def enable_application_owner?
  !!@enable_application_owner
end

#optional_scopesObject



174
175
176
# File 'lib/doorkeeper/config.rb', line 174

def optional_scopes
  @optional_scopes ||= Doorkeeper::OAuth::Scopes.new
end

#orm_nameObject



182
183
184
# File 'lib/doorkeeper/config.rb', line 182

def orm_name
  [:mongoid2, :mongoid3].include?(orm) ? :mongoid : orm
end

#refresh_token_enabled?Boolean

Returns:

  • (Boolean)


158
159
160
# File 'lib/doorkeeper/config.rb', line 158

def refresh_token_enabled?
  !!@refresh_token_enabled
end

#scopesObject



178
179
180
# File 'lib/doorkeeper/config.rb', line 178

def scopes
  @scopes ||= default_scopes + optional_scopes
end