mirror of
https://github.com/czhu12/canine.git
synced 2025-12-16 16:35:10 -06:00
21 lines
554 B
Ruby
21 lines
554 B
Ruby
# frozen_string_literal: true
|
|
|
|
module SSOProviders
|
|
class BuildSSOConfiguration
|
|
extend LightService::Action
|
|
expects :provider_type, :configuration_params
|
|
promises :configuration
|
|
|
|
executed do |context|
|
|
context.configuration = case context.provider_type
|
|
when "ldap"
|
|
LDAPConfiguration.new(context.configuration_params)
|
|
when "oidc"
|
|
OIDCConfiguration.new(context.configuration_params)
|
|
else
|
|
context.fail_and_return!("Unknown provider type: #{context.provider_type}")
|
|
end
|
|
end
|
|
end
|
|
end
|