Module: NulogySSO

Defined in:
lib/nulogy_sso.rb,
lib/nulogy_sso/engine.rb,
lib/nulogy_sso/version.rb,
lib/nulogy_sso/controller_helper.rb,
app/services/nulogy_sso/authenticator.rb,
lib/nulogy_sso/test_utilities/auth0_mock.rb,
app/services/nulogy_sso/origin_redirector.rb,
app/services/nulogy_sso/cookie_token_store.rb,
lib/nulogy_sso/test_utilities/jwt_test_helper.rb,
app/controllers/nulogy_sso/authentication_controller.rb

Defined Under Namespace

Modules: ControllerHelper, OriginRedirector, TestUtilities Classes: AuthenticationController, Authenticator, CookieTokenStore, Engine, SSOConfig

Constant Summary collapse

JWT_EMAIL_KEY =

Public Constants

"https://nulogy.net/email"
VERSION =
"2.5.1"

Class Method Summary collapse

Class Method Details

.sso_config=(sso_config_hash) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/nulogy_sso.rb', line 15

def self.sso_config=(sso_config_hash)
  raise "sso_config must be a Hash" unless sso_config_hash.is_a? Hash

  missing_keys = REQUIRED_SSO_CONFIG_KEYS - sso_config_hash.symbolize_keys.keys
  if missing_keys.present?
    raise "Missing required sso_config keys ['#{missing_keys.join("', '")}']"
  end

  @@sso_config = SSOConfig.new(**sso_config_hash.symbolize_keys.slice(*REQUIRED_SSO_CONFIG_KEYS))
end


39
40
41
# File 'lib/nulogy_sso.rb', line 39

def self.sso_cookie_key
  "#{sso_config.cookie_prefix}_access_token"
end