add saml sp only if vars present
This commit is contained in:
parent
ac246c6775
commit
f77c0fdfe4
1 changed files with 8 additions and 6 deletions
|
@ -17,12 +17,14 @@ if ENV['SAML_IDP_ENABLED'] == 'enabled'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service_providers = {
|
service_providers = {}
|
||||||
"https://#{ENV.fetch('SAML_DOLIST_HOST')}" => {
|
if ENV['SAML_DOLIST_HOST'].present?
|
||||||
response_hosts: [ENV.fetch('SAML_DOLIST_HOST')],
|
service_providers["https://#{ENV.fetch('SAML_DOLIST_HOST')}"] =
|
||||||
cert: ENV.fetch("SAML_DOLIST_CERTIFICATE")
|
{
|
||||||
}
|
response_hosts: [ENV.fetch('SAML_DOLIST_HOST')],
|
||||||
}
|
cert: ENV.fetch("SAML_DOLIST_CERTIFICATE")
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
config.service_provider.finder = -> (entity_id) do
|
config.service_provider.finder = -> (entity_id) do
|
||||||
service_providers[entity_id]
|
service_providers[entity_id]
|
||||||
|
|
Loading…
Add table
Reference in a new issue