Fixed bug in authn method handling.

This commit is contained in:
Roland Hedberg
2014-04-28 09:48:49 +02:00
parent 6fea07be63
commit f6572e156d

View File

@@ -314,7 +314,7 @@ class SSO(Service):
identity[REPOZE_ID_EQUIVALENT] = self.user
try:
try:
metod = self.environ["idp.authn_ref"]
metod = self.environ["idp.authn"]
except KeyError:
pass
else:
@@ -442,7 +442,7 @@ class SSO(Service):
resp = Unauthorized()
self.user = user
self.environ[
"idp.authn_ref"] = AUTHN_BROKER.get_authn_by_accr(
"idp.authn"] = AUTHN_BROKER.get_authn_by_accr(
PASSWORD)
except ValueError:
resp = Unauthorized()
@@ -923,7 +923,8 @@ def application(environ, start_response):
if kaka:
logger.info("= KAKA =")
user, authn_ref = info_from_cookie(kaka)
environ["idp.authn_ref"] = authn_ref
if authn_ref:
environ["idp.authn"] = AUTHN_BROKER[authn_ref]
else:
try:
query = parse_qs(environ["QUERY_STRING"])
@@ -932,6 +933,7 @@ def application(environ, start_response):
except KeyError:
user = None
url_patterns = AUTHN_URLS
if not user:
logger.info("-- No USER --")