Skip to content

Commit f6572e1

Browse files
author
Roland Hedberg
committed
Fixed bug in authn method handling.
1 parent 6fea07b commit f6572e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

example/idp2/idp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def do(self, query, binding_in, relay_state="", encrypt_cert=None):
314314
identity[REPOZE_ID_EQUIVALENT] = self.user
315315
try:
316316
try:
317-
metod = self.environ["idp.authn_ref"]
317+
metod = self.environ["idp.authn"]
318318
except KeyError:
319319
pass
320320
else:
@@ -442,7 +442,7 @@ def ecp(self):
442442
resp = Unauthorized()
443443
self.user = user
444444
self.environ[
445-
"idp.authn_ref"] = AUTHN_BROKER.get_authn_by_accr(
445+
"idp.authn"] = AUTHN_BROKER.get_authn_by_accr(
446446
PASSWORD)
447447
except ValueError:
448448
resp = Unauthorized()
@@ -923,7 +923,8 @@ def application(environ, start_response):
923923
if kaka:
924924
logger.info("= KAKA =")
925925
user, authn_ref = info_from_cookie(kaka)
926-
environ["idp.authn_ref"] = authn_ref
926+
if authn_ref:
927+
environ["idp.authn"] = AUTHN_BROKER[authn_ref]
927928
else:
928929
try:
929930
query = parse_qs(environ["QUERY_STRING"])
@@ -932,6 +933,7 @@ def application(environ, start_response):
932933
except KeyError:
933934
user = None
934935

936+
935937
url_patterns = AUTHN_URLS
936938
if not user:
937939
logger.info("-- No USER --")

0 commit comments

Comments
 (0)