Class: Incline::AuthEngineBase

Inherits:
Object
  • Object
show all
Defined in:
lib/incline/auth_engine_base.rb

Overview

Defines an auth engine.

Direct Known Subclasses

UserManager

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AuthEngineBase

The auth engine initializer should take a hash of parameters.



10
11
12
# File 'lib/incline/auth_engine_base.rb', line 10

def initialize(options = {})
  @options = options || {}
end

Instance Method Details

#authenticate(email, password, client_ip) ⇒ Object

The authenticate method takes an email and password to authenticate a user and the client IP for logging purposes.



16
17
18
# File 'lib/incline/auth_engine_base.rb', line 16

def authenticate(email, password, client_ip)
  nil
end

#begin_external_authentication(request) ⇒ Object

The begin_external_authentication method takes a request object to determine if it should process a login or return nil. If it decides to process authentication, it should return a URL to redirect to.



23
24
25
# File 'lib/incline/auth_engine_base.rb', line 23

def begin_external_authentication(request)
  nil
end

#end_external_authentication(request) ⇒ Object

The end_external_authentication method takes a request object to determine if it should process a logout or return nil. If it decides to process authentication, it should return a URL to redirect to.



30
31
32
# File 'lib/incline/auth_engine_base.rb', line 30

def end_external_authentication(request)
  nil
end