Class: SSO::Server::Warden::Hooks::BeforeLogout
- Inherits:
-
Object
- Object
- SSO::Server::Warden::Hooks::BeforeLogout
- Includes:
- Logging
- Defined in:
- lib/sso/server/warden/hooks/before_logout.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#warden ⇒ Object
readonly
Returns the value of attribute warden.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(user:, warden:, options:) ⇒ BeforeLogout
constructor
A new instance of BeforeLogout.
Methods included from Logging
#debug, #error, #fatal, #info, #logger, #progname, #warn
Constructor Details
#initialize(user:, warden:, options:) ⇒ BeforeLogout
Returns a new instance of BeforeLogout.
24 25 26 |
# File 'lib/sso/server/warden/hooks/before_logout.rb', line 24 def initialize(user:, warden:, options:) @user, @warden, @options = user, warden, end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/sso/server/warden/hooks/before_logout.rb', line 8 def @options end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'lib/sso/server/warden/hooks/before_logout.rb', line 8 def user @user end |
#warden ⇒ Object (readonly)
Returns the value of attribute warden.
8 9 10 |
# File 'lib/sso/server/warden/hooks/before_logout.rb', line 8 def warden @warden end |
Class Method Details
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/sso/server/warden/hooks/before_logout.rb', line 28 def call debug { 'Before warden destroys the passport in the cookie, it will revoke all connected Passports as well.' } revoking = Passports.logout passport_id: params['passport_id'] error { 'Could not revoke the Passports.' } if revoking.failure? debug { 'Finished.' } nil end |