Class: Castle::FailoverAuthResponse
- Inherits:
-
Object
- Object
- Castle::FailoverAuthResponse
- Defined in:
- lib/castle/failover_auth_response.rb
Overview
generate failover authentication response
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(user_id, strategy: Castle.config.failover_strategy, reason:) ⇒ FailoverAuthResponse
constructor
A new instance of FailoverAuthResponse.
Constructor Details
#initialize(user_id, strategy: Castle.config.failover_strategy, reason:) ⇒ FailoverAuthResponse
Returns a new instance of FailoverAuthResponse.
6 7 8 9 10 |
# File 'lib/castle/failover_auth_response.rb', line 6 def initialize(user_id, strategy: Castle.config.failover_strategy, reason:) @strategy = strategy @reason = reason @user_id = user_id end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/castle/failover_auth_response.rb', line 12 def generate { action: @strategy.to_s, user_id: @user_id, failover: true, failover_reason: @reason } end |