Class: SecondFactor::Actions::Base
- Inherits:
-
Object
- Object
- SecondFactor::Actions::Base
show all
- Defined in:
- lib/second_factor/actions/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(guardian, request, target_user:, opts: nil) ⇒ Base
Returns a new instance of Base.
8
9
10
11
12
13
14
|
# File 'lib/second_factor/actions/base.rb', line 8
def initialize(guardian, request, target_user:, opts: nil)
@guardian = guardian
@current_user = guardian.user
@target_user = target_user
@request = request
@opts = HashWithIndifferentAccess.new(opts)
end
|
Instance Attribute Details
#current_user ⇒ Object
Returns the value of attribute current_user.
6
7
8
|
# File 'lib/second_factor/actions/base.rb', line 6
def current_user
@current_user
end
|
#guardian ⇒ Object
Returns the value of attribute guardian.
6
7
8
|
# File 'lib/second_factor/actions/base.rb', line 6
def guardian
@guardian
end
|
#request ⇒ Object
Returns the value of attribute request.
6
7
8
|
# File 'lib/second_factor/actions/base.rb', line 6
def request
@request
end
|
Instance Method Details
#no_second_factors_enabled!(params) ⇒ Object
24
25
26
|
# File 'lib/second_factor/actions/base.rb', line 24
def no_second_factors_enabled!(params)
raise NotImplementedError.new
end
|
#second_factor_auth_completed!(callback_params) ⇒ Object
32
33
34
|
# File 'lib/second_factor/actions/base.rb', line 32
def second_factor_auth_completed!(callback_params)
raise NotImplementedError.new
end
|
#second_factor_auth_required!(params) ⇒ Object
28
29
30
|
# File 'lib/second_factor/actions/base.rb', line 28
def second_factor_auth_required!(params)
raise NotImplementedError.new
end
|
#second_factor_auth_skipped!(params) ⇒ Object
20
21
22
|
# File 'lib/second_factor/actions/base.rb', line 20
def second_factor_auth_skipped!(params)
raise NotImplementedError.new
end
|
#skip_second_factor_auth?(params) ⇒ Boolean
16
17
18
|
# File 'lib/second_factor/actions/base.rb', line 16
def skip_second_factor_auth?(params)
false
end
|