Closed jtamyrc closed 2 years ago
I check the source code from the error.
It turns out the settings_data
should be defined like below.
settings_data = {
'strict': True,
'debug': True,
'sp': {
'entityId': 'https://example.ngrok.io/metadata',
'assertionConsumerService': {
'url': 'https://example.ngrok.io/?acs',
'binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
},
'singleLogoutService': {
'url': 'https://example.ngrok.io/?sls',
'binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
},
'NameIDFormat': 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',
'x509cert': 'xxx',
'privateKey': ''
},
'idp': {
'entityId': 'https://samltest.id/saml/idp',
'singleSignOnService': {
'url': 'https://samltest.id/idp/profile/SAML2/Redirect/SSO',
'binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
},
'singleLogoutService': {
'url': 'https://samltest.id/idp/profile/SAML2/Redirect/SLO',
'binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
},
'x509cert': 'xxx'
},
'security': {
'nameIdEncrypted': False,
'authnRequestsSigned': False,
'logoutRequestSigned': False,
'logoutResponseSigned': False,
'signMetadata': False,
'wantAttributeStatement': False,
'wantMessagesSigned': False,
'wantAssertionsSigned': False,
'wantNameId': True,
'wantNameIdEncrypted': False,
'wantAssertionsEncrypted': False,
'signatureAlgorithm': 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
'digestAlgorithm': 'http://www.w3.org/2001/04/xmlenc#sha256'
},
'contactPerson': {
'technical': {
'givenName': 'xxx',
'emailAddress': 'xxx'
},
'support': {
'givenName': 'xxx',
'emailAddress': 'xxx'
}
},
'organization': {
'nl-NL': {
'name': 'xxx',
'displayname': 'xxx',
'url': 'xxx'
}
}
}
I would like to inititalize auth by passing a settings_data dict but I cannot find any documentation of it, could you please advice? What is the format of the
settings_data
I should prepare to pass?