Class: HubSsoLib::SessionBase
- Inherits:
-
Object
- Object
- HubSsoLib::SessionBase
- Defined in:
- lib/hub_sso_lib.rb
Overview
A dumpable base class that can be used for undumpable proxies, where a change made in an object passed to a client is reflected on the server where the object actually lives; or for dumpable clones of sessions sent as read-only copies to clients which won’t disppear due to server side deletion from key rotation, expiry or admin-driven deletion.
Direct Known Subclasses
Constant Summary collapse
- ATTRIBUTES =
%i{ session_last_used session_flash session_user session_rotated_key }
Instance Attribute Summary collapse
-
#session_return_to ⇒ Object
readonly
DEPRECATED.
Instance Method Summary collapse
-
#initialize(copying_session: nil) ⇒ SessionBase
constructor
A new instance of SessionBase.
Constructor Details
#initialize(copying_session: nil) ⇒ SessionBase
Returns a new instance of SessionBase.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/hub_sso_lib.rb', line 429 def initialize(copying_session: nil) if .nil? self.session_last_used = Time.now.utc self.session_flash = {} self.session_user = HubSsoLib::User.new self.session_rotated_key = nil else ATTRIBUTES.each do | attr | self.send("#{attr}=", .send(attr)) end end rescue => e Sentry.capture_exception(e) if defined?(Sentry) && Sentry.respond_to?(:capture_exception) raise end |
Instance Attribute Details
#session_return_to ⇒ Object (readonly)
DEPRECATED
427 428 429 |
# File 'lib/hub_sso_lib.rb', line 427 def session_return_to @session_return_to end |