From a7226557d10c0472aead6bc8a2f5e946aa5dc45d Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Mon, 14 Mar 2011 21:52:17 +0100 Subject: [PATCH] support for cases when you don't care whether the session has timedout or not --- src/saml2/population.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/saml2/population.py b/src/saml2/population.py index e4efb46..5650d28 100644 --- a/src/saml2/population.py +++ b/src/saml2/population.py @@ -46,9 +46,10 @@ class Population(object): def remove_person(self, subject_id): self.cache.delete(subject_id) - def get_entityid(self, subject_id, source_id): + def get_entityid(self, subject_id, source_id, check_not_on_or_after=True): try: - return self.cache.get(subject_id, source_id)["name_id"] + return self.cache.get(subject_id, source_id, + check_not_on_or_after)["name_id"] except (KeyError, ValueError): return ""