Sha256: ba61943b796659747d97b05f05b52b94cc5851fda27f285de6a645b4682a1332
Contents?: true
Size: 811 Bytes
Versions: 21
Compression:
Stored size: 811 Bytes
Contents
module SoarAuthenticationToken class TokenGenerator def initialize(configuration) @configuration = configuration validate_configuration instantiate_provider end def inject_store_provider(store_provider) @provider.inject_store_provider(store_provider) end def generate(authenticated_identifier:, flow_identifier: nil) @provider.generate(authenticated_identifier: authenticated_identifier, flow_identifier: flow_identifier) end private def instantiate_provider @provider = Object::const_get("SoarAuthenticationToken::#{@configuration['provider']}").new(@configuration) end def validate_configuration raise "'provider' must be configured" unless @configuration['provider'] end end end
Version data entries
21 entries across 21 versions & 1 rubygems