Module: HubSsoLib
- Defined in:
- lib/hub_sso_lib.rb
Overview
Module: HubSsoLib #
(C) Hipposoft 2006-2025 #
#
Purpose: Cross-application same domain single sign-on support. #
#
Author: A.D.Hodgkinson #
#
History: 20-Oct-2006 (ADH): First version of stand-alone library, #
split from Hub application. #
08-Dec-2006 (ADH): DRB URI, path prefix and random file #
path come from environment variables. #
09-Mar-2011 (ADH): Updated for Hub on Rails 2.3.11 along #
with several important bug fixes. #
01-May-2019 (ADH): Updated for Ruby 2.5.x. #
25-Mar-2025 (ADH): Major 2025 overhaul for ROOL site. #
Defined Under Namespace
Modules: Core, Server Classes: Permissions, Roles, Serialiser, Session, SessionFactory, Trust, User
Constant Summary collapse
- HUB_CONNECTION_URI =
DRb connections.
ENV['HUB_CONNECTION_URI' ] || 'drbunix:' + File.join(ENV['HOME'] || '/', '/.hub_drb')
- HUB_TRUST_CONNECTION_URI =
ENV['HUB_TRUST_CONNECTION_URI'] || 'drbunix:' + File.join(ENV['HOME'] || '/', '/.hub_trust_drb')
- HUB_COMMAND_REGISTRY =
External application command registry for on-user-change events.
ENV['HUB_COMMAND_REGISTRY'] || File.join(ENV['HOME'] || '/', '/.hub_cmd_reg')
- HUB_SESSION_ARCHIVE =
DRb session on-shutdown dumped cache/archive.
ENV['HUB_SESSION_ARCHIVE'] || File.join( ENV['HOME'] || '/', '/.hub_ses_arc')
- HUB_PATH_PREFIX =
Location of Hub application root.
ENV['HUB_PATH_PREFIX'] || ''
- HUB_IDLE_TIME_LIMIT =
Time limit, *in seconds*, for the account inactivity timeout. If a user performs no Hub actions during this time they will be automatically logged out upon their next action, with a Flash message set to explain why.
ENV['HUB_IDLE_TIME_LIMIT']&.to_i || 4 * 60 * 60
- HUB_ARCHIVE_TIME_LIMIT =
Archive time for very old sessions that are kicked out foricbly.
[ HUB_IDLE_TIME_LIMIT * 3, 172_800 ].max()
- HUB_SESSION_ENUMERATION_KEY_MAX =
If you use live session enumeration, this is the hard-coded limit for the number of session keys that can be returned. If there are more active sessions that this, bulk session enumeration is not permitted.
ENV['HUB_SESSION_ENUMERATION_KEY_MAX']&.to_i || 2000
- HUB_COOKIE_NAME =
Shared cookie name.
:hubapp_shared_id- HUB_LOGIN_INDICATOR_COOKIE =
Principally for #hubssolib_account_link.
:hubapp_shared_id_alive- HUB_LOGIN_INDICATOR_COOKIE_VALUE =
'Y'- HUB_BYPASS_SSL =
Bypass SSL, for testing purposes? Rails ‘production’ mode will insist on SSL otherwise. Development & test environments do not, so do not need this variable setting.
( ENV['HUB_BYPASS_SSL'] == "true" )
- HUB_MUTEX =
Thread safety.
Mutex.new