Class: LeveretAuth::Strategies::BaseStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/leveret_auth/strategies/base_strategy.rb

Direct Known Subclasses

DeviseStrategy, LdapStrategy

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ BaseStrategy

Returns a new instance of BaseStrategy.



14
15
16
17
18
# File 'lib/leveret_auth/strategies/base_strategy.rb', line 14

def initialize(params)
  permitted_attrs.each do |key|
    instance_variable_set("@#{key}", params[key])
  end
end

Class Method Details

.configObject



5
6
7
# File 'lib/leveret_auth/strategies/base_strategy.rb', line 5

def config
  @config ||= {}
end

.configure(configuration) ⇒ Object



9
10
11
# File 'lib/leveret_auth/strategies/base_strategy.rb', line 9

def configure(configuration)
  @config = configuration
end

Instance Method Details

#authenticate!Object



20
21
22
# File 'lib/leveret_auth/strategies/base_strategy.rb', line 20

def authenticate!
  raise 'Must implement the method: `authenticate!`'
end