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



34
35
36
37
38
39
# File 'lib/oauth2/provider.rb', line 34

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:



29
30
31
32
# File 'lib/oauth2/provider.rb', line 29

def self.configure
  yield self
  activate
end