mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 09:07:02 +02:00
enhance state mismatch error message
This commit is contained in:
parent
e4b0f1ad43
commit
63c0aec4b8
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ class Client(oic.Client):
|
||||||
|
|
||||||
if authn_response["state"] != session.get("state", None):
|
if authn_response["state"] != session.get("state", None):
|
||||||
# this most likely means the user's Django session vanished
|
# this most likely means the user's Django session vanished
|
||||||
logger.error("Received state not the same as expected for %s" % state)
|
logger.error(
|
||||||
|
f"Received state not the same as expected for {state}"
|
||||||
|
f"authn_response['state'] = {authn_response['state']}"
|
||||||
|
f"session.get('state', None) = {session.get('state', None)}"
|
||||||
|
)
|
||||||
if session.get("state", None) is None:
|
if session.get("state", None) is None:
|
||||||
raise o_e.NoStateDefined()
|
raise o_e.NoStateDefined()
|
||||||
raise o_e.AuthenticationFailed(locator=state)
|
raise o_e.AuthenticationFailed(locator=state)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue