Module: OAuth2::Provider

Defined in:
lib/oauth2/provider.rb,
lib/oauth2/provider/version.rb

Defined Under Namespace

Modules: Models, Rack, Rails, Random

Constant Summary collapse

VERSION =
"0.0.19"

Class Method Summary collapse

Class Method Details

.activateObject


36
37
38
39
40
41
# File 'lib/oauth2/provider.rb', line 36

def self.activate
  case backend
    when :mongoid then OAuth2::Provider::Models::Mongoid.activate
    else OAuth2::Provider::Models::ActiveRecord.activate
  end
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


31
32
33
34
# File 'lib/oauth2/provider.rb', line 31

def self.configure
  yield self
  activate
end