During our implementation this module to our application, I found that reading error details is extremely helpful for troubleshooting. I recommend updating examples in readme.md to invoke get_last_error_reason() when handling SAML response error.
Below is a code snippet I used in my applicaiton.
saml_auth = OneLogin_Saml2_Auth(saml_params, custom_base_path={path})
saml_auth.process_response()
errors = saml_auth.get_errors()
if errors:
err_msg = "Error processing SAML Response: {0}. {1}".format(','.join(errors), saml_auth.get_last_error_reason())
...
During our implementation this module to our application, I found that reading error details is extremely helpful for troubleshooting. I recommend updating examples in readme.md to invoke get_last_error_reason() when handling SAML response error.
Below is a code snippet I used in my applicaiton.
saml_auth = OneLogin_Saml2_Auth(saml_params, custom_base_path={path})
saml_auth.process_response()
errors = saml_auth.get_errors()
if errors:
err_msg = "Error processing SAML Response: {0}. {1}".format(','.join(errors), saml_auth.get_last_error_reason())
...