Did I find the right examples for you? yes no

All Samples(24)  |  Call(19)  |  Derive(0)  |  Import(5)
Handles assertions about subjects 

src/p/y/pysaml2-2.0.0/src/saml2/server.py   pysaml2(Download)
from saml2.sigver import pre_signature_part, signed_instance_factory, CertificateError, CryptoBackendXmlSec1
 
from saml2.assertion import Assertion
from saml2.assertion import Policy
from saml2.assertion import restriction_from_attribute_spec
        #if identity:
        _issuer = self._issuer(issuer)
        ast = Assertion(identity)
        if policy is None:
            policy = Policy()
        if identity:
            _issuer = self._issuer(issuer)
            ast = Assertion(identity)
            if policy:
                ast.apply_policy(sp_entity_id, policy, self.metadata)

src/p/y/pysaml2-HEAD/src/saml2/server.py   pysaml2(Download)
from saml2.sigver import pre_signature_part, signed_instance_factory, CertificateError, CryptoBackendXmlSec1
 
from saml2.assertion import Assertion
from saml2.assertion import Policy
from saml2.assertion import restriction_from_attribute_spec
        #if identity:
        _issuer = self._issuer(issuer)
        ast = Assertion(identity)
        ast.acs = self.config.getattr("attribute_converters", "idp")
        if policy is None:
        if identity:
            _issuer = self._issuer(issuer)
            ast = Assertion(identity)
            if policy:
                ast.apply_policy(sp_entity_id, policy, self.metadata)

src/p/y/pysaml2-2.0.0/tests/test_20_assertion.py   pysaml2(Download)
from saml2.saml import NAMEID_FORMAT_TRANSIENT
from saml2.assertion import Policy
from saml2.assertion import Assertion
from saml2.assertion import filter_on_attributes
from saml2.assertion import filter_attribute_value_assertions
def test_assertion_1(AVA):
    ava = Assertion(AVA[0])
 
    print ava
    print ava.__dict__
    assert _eq(ava.keys(), [])
 
    ava = Assertion(AVA[1].copy())
    ava = ava.apply_policy("", policy)
    assert _eq(ava.keys(), ["givenName"])
    assert ava["givenName"] == ["Ryan"]
 
    ava = Assertion(AVA[3].copy())
           'uid': 'http://roland.hedberg.myopenid.com/'}
 
    ava = Assertion(AVA)
 
    policy = Policy({

src/p/y/pysaml2-HEAD/tests/test_20_assertion.py   pysaml2(Download)
from saml2.saml import NAMEID_FORMAT_TRANSIENT
from saml2.assertion import Policy
from saml2.assertion import Assertion
from saml2.assertion import filter_on_attributes
from saml2.assertion import filter_attribute_value_assertions
def test_assertion_1(AVA):
    ava = Assertion(AVA[0])
 
    print ava
    print ava.__dict__
    assert _eq(ava.keys(), [])
 
    ava = Assertion(AVA[1].copy())
    ava = ava.apply_policy("", policy)
    assert _eq(ava.keys(), ["givenName"])
    assert ava["givenName"] == ["Ryan"]
 
    ava = Assertion(AVA[3].copy())
           'uid': 'http://roland.hedberg.myopenid.com/'}
 
    ava = Assertion(AVA)
 
    policy = Policy({

src/p/y/pysaml2-HEAD/tests/test_51_client.py   pysaml2(Download)
from saml2 import sigver
from saml2 import s_utils
from saml2.assertion import Assertion
 
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
                                           format=saml.NAMEID_FORMAT_PERSISTENT)
 
        asser = Assertion({"givenName": "Derek", "surName": "Jeter"})
        assertion = asser.construct(
            self.client.config.entityid, "_012345",