File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
demo_pyramid/demo_pyramid Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1414 {% for err in errors %}
1515 <li >{{err}}</li >
1616 {% endfor %}
17- </ul >
17+ Reason: {{ error_reason }}
18+ </ul >
1819 </div >
1920{% endif %}
2021
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ def index(request):
3333 req = prepare_pyramid_request (request )
3434 auth = init_saml_auth (req )
3535 errors = []
36+ error_reason = ""
3637 not_auth_warn = False
3738 success_slo = False
3839 attributes = False
@@ -65,6 +66,8 @@ def index(request):
6566 self_url = OneLogin_Saml2_Utils .get_self_url (req )
6667 if 'RelayState' in request .POST and self_url != request .POST ['RelayState' ]:
6768 return HTTPFound (auth .redirect_to (request .POST ['RelayState' ]))
69+ else :
70+ error_reason = auth .get_last_error_reason ()
6871 elif 'sls' in request .GET :
6972 dscb = lambda : session .clear ()
7073 url = auth .process_slo (delete_session_cb = dscb )
@@ -82,6 +85,7 @@ def index(request):
8285
8386 return {
8487 'errors' : errors ,
88+ 'error_reason' : error_reason ,
8589 'not_auth_warn' : not_auth_warn ,
8690 'success_slo' : success_slo ,
8791 'attributes' : attributes ,
You can’t perform that action at this time.
0 commit comments