diff options
author | Roland Hedberg <roland.hedberg@adm.umu.se> | 2016-02-11 11:08:04 +0100 |
---|---|---|
committer | Roland Hedberg <roland.hedberg@adm.umu.se> | 2016-02-11 11:08:04 +0100 |
commit | 0515de9fa8b7f339baba826f87eedc8c922dfa7f (patch) | |
tree | e60e1329e3b9786aae864da847247bea672b94c5 /src/saml2/cache.py | |
parent | 1220e8580ca90d6658ae67918ec405cebc5433d6 (diff) | |
download | pysaml2-0515de9fa8b7f339baba826f87eedc8c922dfa7f.tar.gz |
Language correction.
Deal with case where people want to JSON serialize session information.
Carry over more parameters in create_attribute_response.
Diffstat (limited to 'src/saml2/cache.py')
-rw-r--r-- | src/saml2/cache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/saml2/cache.py b/src/saml2/cache.py index ae00afb8..5b72e9d1 100644 --- a/src/saml2/cache.py +++ b/src/saml2/cache.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import shelve +import six from saml2.ident import code, decode from saml2 import time_util, SAMLError import logging @@ -98,6 +99,8 @@ class Cache(object): if check_not_on_or_after and time_util.after(timestamp): raise ToOld("past %s" % str(timestamp)) + if 'name_id' in info and isinstance(info['name_id'], six.string_types): + info['name_id'] = decode(info['name_id']) return info or None def set(self, name_id, entity_id, info, not_on_or_after=0): |