Module: Rottweiler::Authentication::ClassMethods

Defined in:
lib/rottweiler/authentication.rb

Overview

Implement Rottweiler::Authentication class methods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_rottweilerObject

Returns the value of attribute _rottweiler.



27
28
29
# File 'lib/rottweiler/authentication.rb', line 27

def _rottweiler
  @_rottweiler
end

Instance Method Details

#on_authentication_failed(method_name = nil, &callback) ⇒ Object



41
42
43
# File 'lib/rottweiler/authentication.rb', line 41

def on_authentication_failed(method_name = nil, &callback)
  rottweiler.auth_failed_cbk = callback || method_name
end

#on_authentication_success(method_name = nil, &callback) ⇒ Object



37
38
39
# File 'lib/rottweiler/authentication.rb', line 37

def on_authentication_success(method_name = nil, &callback)
  rottweiler.auth_success_cbk = callback || method_name
end

#rottweilerObject



29
30
31
# File 'lib/rottweiler/authentication.rb', line 29

def rottweiler
  self._rottweiler ||= Rottweiler::Auth::Settings.new(superclass)
end

#skip_authentication!(**options) ⇒ Object



33
34
35
# File 'lib/rottweiler/authentication.rb', line 33

def skip_authentication!(**options)
  rottweiler.skip_authentication!(**options)
end