summaryrefslogtreecommitdiff
path: root/src/saml2/authn_context
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2013-12-13 13:44:53 +0100
committerRoland Hedberg <roland.hedberg@adm.umu.se>2013-12-13 13:44:53 +0100
commitb6336dc0cda2626c010894a0ff978b6c67516d60 (patch)
tree289bb714419ded36b1dfb1c9fb8187f9f0610784 /src/saml2/authn_context
parentc2701e9ba2c768d62dd54e171b51229a21135e83 (diff)
downloadpysaml2-b6336dc0cda2626c010894a0ff978b6c67516d60.tar.gz
Fixed all tests and various bugs that appeared during that process.
Diffstat (limited to 'src/saml2/authn_context')
-rw-r--r--src/saml2/authn_context/__init__.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/saml2/authn_context/__init__.py b/src/saml2/authn_context/__init__.py
index 0368d109..b75a857a 100644
--- a/src/saml2/authn_context/__init__.py
+++ b/src/saml2/authn_context/__init__.py
@@ -36,16 +36,20 @@ class AuthnBroker(object):
self.db = {"info": {}, "key": {}}
self.next = 0
- def exact(self, a, b):
+ @staticmethod
+ def exact(a, b):
return a == b
- def minimum(self, a, b):
+ @staticmethod
+ def minimum(a, b):
return b >= a
- def maximum(self, a, b):
+ @staticmethod
+ def maximum(a, b):
return b <= a
- def better(self, a, b):
+ @staticmethod
+ def better(a, b):
return b > a
def add(self, spec, method, level=0, authn_authority="", reference=None):
@@ -164,7 +168,7 @@ class AuthnBroker(object):
else:
_cmp = "minimum"
return self._pick_by_class_ref(
- req_authn_context.authn_context_class_ref.text, _cmp)
+ 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