Class: CASServer::Authenticators::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#usernameObject (readonly)

Returns the value of attribute username.



5
6
7
# File 'lib/casserver/authenticators/base.rb', line 5

def username
  @username
end

Instance Method Details

#configure(options) ⇒ Object

Raises:

  • (ArgumentError)


12
13
14
15
16
# File 'lib/casserver/authenticators/base.rb', line 12

def configure(options)
  raise ArgumentError, "options must be a HashWithIndifferentAccess" unless options.kind_of? HashWithIndifferentAccess
  @options = options.dup
  @extra_attributes = {}
end

#extra_attributesObject



18
19
20
# File 'lib/casserver/authenticators/base.rb', line 18

def extra_attributes
  @extra_attributes
end

#validate(credentials) ⇒ Object

make this accessible so that we can pick up any transformations done within the authenticator

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/casserver/authenticators/base.rb', line 8

def validate(credentials)
  raise NotImplementedError, "This method must be implemented by a class extending #{self.class}"
end