-
-
Notifications
You must be signed in to change notification settings - Fork 310
Description
We use django-allauth and are implementing support for customers/users bringing their own SAML IdP configurations.
We use OneLogin_Saml2_Settings in order to validate the SAML configurations they give to us.
However, I'm not seeing a clear and obvious way to have the OneLogin_Saml2_Settings object returned by OneLogin_Saml2_Settings(settings_input_from_customer) to give me back a serialized JSON or dict object that I can write to our DB to persist the configuration.
I'd imagine an API like OneLogin_Saml2_Settings._settings or something public-facing like OneLogin_Saml2_Settings.get_settings() that I can call on a valid instance to get back a mapping of the settings.
Am I missing something obvious?
As a result of not seeing an API for this, my code is doing something clunky like:
_settings = {
"idp": {
...
},
"sp": {
...
},
"strict": True,
}
# Initialization of the following object performs settings validation
OneLogin_Saml2_Settings(_settings)
return _settings