Module: Challah::Providers
- Included in:
- Challah
- Defined in:
- lib/challah/providers.rb
Instance Method Summary collapse
-
#custom_providers ⇒ Object
Get a list of all authorization providers other than password provider.
-
#providers ⇒ Object
Get the list of all authorization providers that have been registered.
-
#register_provider(name, klass) ⇒ Object
Register a new authorization provider.
Instance Method Details
#custom_providers ⇒ Object
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 |
#providers ⇒ Object
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 |