summaryrefslogtreecommitdiff
path: root/src/saml2/authn_context/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/saml2/authn_context/__init__.py')
-rw-r--r--src/saml2/authn_context/__init__.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/saml2/authn_context/__init__.py b/src/saml2/authn_context/__init__.py
index 1faabbca..97461396 100644
--- a/src/saml2/authn_context/__init__.py
+++ b/src/saml2/authn_context/__init__.py
@@ -166,14 +166,20 @@ class AuthnBroker(object):
if req_authn_context.comparison:
_cmp = req_authn_context.comparison
else:
- _cmp = "minimum"
- return self._pick_by_class_ref(
- req_authn_context.authn_context_class_ref[0].text, _cmp)
+ _cmp = "exact"
+ if _cmp == 'exact':
+ res = []
+ for cls_ref in req_authn_context.authn_context_class_ref:
+ res += (self._pick_by_class_ref(cls_ref.text, _cmp))
+ return res
+ else:
+ return self._pick_by_class_ref(
+ req_authn_context.authn_context_class_ref[0].text, _cmp)
elif req_authn_context.authn_context_decl_ref:
if req_authn_context.comparison:
_cmp = req_authn_context.comparison
else:
- _cmp = "minimum"
+ _cmp = "exact"
return self._pick_by_class_ref(
req_authn_context.authn_context_decl_ref, _cmp)