Implement VIP table and fix 401 login bug

This commit is contained in:
Rachid Mrad 2024-01-18 19:58:53 -05:00
parent 7077519837
commit 510da21934
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
11 changed files with 175 additions and 1 deletions

View file

@ -183,6 +183,8 @@ class Client(oic.Client):
if authn_response["state"] != session.get("state", None):
# this most likely means the user's Django session vanished
logger.error("Received state not the same as expected for %s" % state)
if session.get("state", None) is None:
raise o_e.NoStateDefined()
raise o_e.AuthenticationFailed(locator=state)
if self.behaviour.get("response_type") == "code":
@ -272,6 +274,11 @@ class Client(oic.Client):
super(Client, self).store_response(resp, info)
def get_default_acr_value(self):
"""returns the acr_value from settings
this helper function is called from djangooidc views"""
return self.behaviour.get("acr_value")
def get_step_up_acr_value(self):
"""returns the step_up_acr_value from settings
this helper function is called from djangooidc views"""