Class: SSO::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/sso/base.rb

Direct Known Subclasses

Apache, Signo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ Base


7
8
9
# File 'lib/sso/base.rb', line 7

def initialize(controller)
  @controller = controller
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller


3
4
5
# File 'lib/sso/base.rb', line 3

def controller
  @controller
end

#userObject

Returns the value of attribute user


4
5
6
# File 'lib/sso/base.rb', line 4

def user
  @user
end

Instance Method Details

#authenticate!Object

Raises:

  • (NotImplementedError)

26
27
28
# File 'lib/sso/base.rb', line 26

def authenticate!
  raise NotImplementedError, "#{__method__} not implemented for this authentication method"
end

#authenticated?Boolean

if your SSO method supports logout page, you should store it into a session during this method execution

Raises:

  • (NotImplementedError)

22
23
24
# File 'lib/sso/base.rb', line 22

def authenticated?
  raise NotImplementedError, "#{__method__} not implemented for this authentication method"
end

#support_expiration?Boolean

don't forget to implement expiration_url method if your SSO method changes this to true


16
17
18
# File 'lib/sso/base.rb', line 16

def support_expiration?
  false
end

#support_login?Boolean


11
12
13
# File 'lib/sso/base.rb', line 11

def support_login?
  false
end