Module: Challah::Providers

Included in:
Challah
Defined in:
lib/challah/providers.rb

Instance Method Summary collapse

Instance Method Details

#custom_providersObject

Get a list of all authorization providers other than password provider



4
5
6
# File 'lib/challah/providers.rb', line 4

def custom_providers
  providers.reject { |k, v| k == :password }
end

#providersObject

Get the list of all authorization providers that have been registered.



18
19
20
# File 'lib/challah/providers.rb', line 18

def providers
  @providers.dup
end

#register_provider(name, klass) ⇒ Object

Register a new authorization provider.

Usage:

Challah.register_provider(:facebook, FacebookProvider)


13
14
15
# File 'lib/challah/providers.rb', line 13

def register_provider(name, klass)
  @providers[name] = klass
end