module Challah::Authenticators

Public Instance Methods

authenticators() click to toggle source

Get the list of all authenticators that have been registered.

# File lib/challah/authenticators.rb, line 19
def authenticators
  @authenticators.dup
end
register_authenticator(name, klass) click to toggle source

Register a new authenticator.

Usage:

Challah.register_authenticator(:facebook, FacebookAuthenticator)

Each authenticator class should have a class method named match? that takes a user and a number of arguments and returns true or false.

# File lib/challah/authenticators.rb, line 14
def register_authenticator(name, klass)
  @authenticators[name] = klass
end