Did I find the right examples for you? yes no

All Samples(16)  |  Call(10)  |  Derive(0)  |  Import(6)

        def decode(txt):
    _nid = NameID()
    for part in txt.split(","):
        i, val = part.split("=")
        setattr(_nid, ATTR[int(i)], unquote(val))
    return _nid
        


src/p/y/pysaml2-2.0.0/src/saml2/cache.py   pysaml2(Download)
#!/usr/bin/env python
 
import shelve
from saml2.ident import code, decode
from saml2 import time_util, SAMLError
        :return: list of subject identifiers
        """
        return [decode(c) for c in self._db.keys()]
 

src/p/y/pysaml2-HEAD/src/saml2/cache.py   pysaml2(Download)
#!/usr/bin/env python
 
import shelve
from saml2.ident import code, decode
from saml2 import time_util, SAMLError
        :return: list of subject identifiers
        """
        return [decode(c) for c in self._db.keys()]
 

src/p/y/pysaml2-2.0.0/src/s2repoze/plugins/sp.py   pysaml2(Download)
 
from saml2.client import Saml2Client
from saml2.ident import code, decode
from saml2.s_utils import sid
from saml2.config import config_factory
 
        if 'REMOTE_USER' in environ:
            name_id = decode(environ["REMOTE_USER"])
 
            _cli = self.saml_client
    def add_metadata(self, environ, identity):
        """ Add information to the knowledge I have about the user """
        name_id = identity['repoze.who.userid']
        if isinstance(name_id, basestring):
            name_id = decode(name_id)
    def authenticate(self, environ, identity=None):
        if identity:
            tktuser = identity.get('repoze.who.plugins.auth_tkt.userid', None)
            if tktuser and self.saml_client.is_logged_in(decode(tktuser)):
                return tktuser

src/p/y/pysaml2-HEAD/src/s2repoze/plugins/sp.py   pysaml2(Download)
 
from saml2.client import Saml2Client
from saml2.ident import code, decode
from saml2.s_utils import sid
from saml2.config import config_factory
 
        if 'REMOTE_USER' in environ:
            name_id = decode(environ["REMOTE_USER"])
 
            _cli = self.saml_client
            try:
                # Make sure that userids authenticated by another plugin don't cause problems here.
                name_id = decode(name_id)
            except:
                pass
                return identity.get('login')
            tktuser = identity.get('repoze.who.plugins.auth_tkt.userid', None)
            if tktuser and self.saml_client.is_logged_in(decode(tktuser)):
                return tktuser
            return None

src/p/y/pysaml2-2.0.0/src/saml2/client.py   pysaml2(Download)
from saml2 import BINDING_SOAP
 
from saml2.ident import decode
from saml2.httpbase import HTTPError
from saml2.s_utils import sid
 
        if isinstance(name_id, basestring):
            name_id = decode(name_id)
 
        logger.info("logout request for: %s" % name_id)

src/p/y/pysaml2-HEAD/src/saml2/client.py   pysaml2(Download)
from saml2 import BINDING_SOAP
 
from saml2.ident import decode
from saml2.httpbase import HTTPError
from saml2.s_utils import sid
 
        if isinstance(name_id, basestring):
            name_id = decode(name_id)
 
        logger.info("logout request for: %s" % name_id)