Class: Kazoo::Bouncer::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/kazoo/bouncer/authenticator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object



5
6
7
# File 'lib/kazoo/bouncer/authenticator.rb', line 5

def self.inherited(klass)
  Kazoo::Bouncer.add_authenticator klass
end

Instance Method Details

#call(req) ⇒ Object



9
10
11
12
13
# File 'lib/kazoo/bouncer/authenticator.rb', line 9

def call(req)
  @_params = req.params
  @_request = req
  run
end

#paramsObject



15
16
17
# File 'lib/kazoo/bouncer/authenticator.rb', line 15

def params
  @_params
end

#requestObject



19
20
21
# File 'lib/kazoo/bouncer/authenticator.rb', line 19

def request
  @_request
end

#runObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/kazoo/bouncer/authenticator.rb', line 23

def run
  raise NotImplementedError, "You must override the `run` method in #{self.class.name}. Please don't punch any ducks"
end