def register_auth_engine(engine, *domains)
      unless engine.nil?
        unless engine.is_a?(::Incline::AuthEngineBase)
          raise ArgumentError, "The 'engine' parameter must be an instance of an auth engine or a class defining an auth engine." unless engine.is_a?(::Class)
          engine = engine.new(@options)
          raise ArgumentError, "The 'engine' parameter must be an instance of an auth engine or a class defining an auth engine." unless engine.is_a?(::Incline::AuthEngineBase)
        end
      end
      domains.map do |dom|
        dom = dom.to_s.downcase.strip
        raise ArgumentError, "The domain #{dom.inspect} does not appear to be a valid domain." unless dom =~ /\A[a-z0-9]+(?:[-.][a-z0-9]+)*\.[a-z]+\Z/
        dom
      end.each do |dom|
        auth_engines[dom] = engine
      end
    end
def register_auth_engine(engine, *domains)
      unless engine.nil?
        unless engine.is_a?(::Incline::AuthEngineBase)
          raise ArgumentError, "The 'engine' parameter must be an instance of an auth engine or a class defining an auth engine." unless engine.is_a?(::Class)
          engine = engine.new(@options)
          raise ArgumentError, "The 'engine' parameter must be an instance of an auth engine or a class defining an auth engine." unless engine.is_a?(::Incline::AuthEngineBase)
        end
      end
      domains.map do |dom|
        dom = dom.to_s.downcase.strip
        raise ArgumentError, "The domain #{dom.inspect} does not appear to be a valid domain." unless dom =~ /\A[a-z0-9]+(?:[-.][a-z0-9]+)*\.[a-z]+\Z/
        dom
      end.each do |dom|
        auth_engines[dom] = engine
      end
    end
Registers an authentication engine for one or more domains.

 The +engine+ passed in should take an options hash as the only argument to +initialize+
 and should provide an +authenticate+ method that takes the +email+, +password+, and
 +client_ip+.  You can optionally define an +authenticate_external+ method that takes the
 current +request+ as the only parameter.

 The +authenticate+ method of the engine should return an Incline::User object on success or nil on failure.
 The +begin_external_authentication+ method of the engine should return a URL to redirect to on success
 or nil on failure.

   class MyAuthEngine
     def initialize(options = {})
       ...
     end

     def authenticate(email, password, client_ip)
       ...
     end

     def begin_external_authentication(request)
       ...
     end
   end

   Incline::UserManager.register_auth_engine(MyAuthEngine, 'example.com', 'example.net', 'example.org')