Did I find the right examples for you? yes no

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)
What attribute and attribute values returns depends on what
the SP has said it wants in the request or in the metadata file and
what the IdP/AA wants to release. An assumption is that what the SP
asks for overrides whatever is in the metadata. But of course the
IdP never releases anything it doesn't want to.

:param ava: The information about the subject as a dictionary
:param sp_entity_id: The entity ID of the SP
:param mdstore: A Metadata store
:param required: Attributes that the SP requires in the assertion(more...)

src/p/y/pysaml2-HEAD/tests/test_20_assertion.py   pysaml2(Download)
           "mail": "derek@example.com"}
 
    ava = r.filter(ava, "urn:mace:umu.se:saml:roland:sp", None, None)
    assert _eq(ava.keys(), ["givenName", "surName"])
 
    # mail removed because it doesn't match the regular expression
    # So it should fail if the 'fail_on_ ...' flag wasn't set
    _ava = policy.filter(ava,'urn:mace:umu.se:saml:roland:sp', None,
                         [mail], [gn, sn])
 
 
    # it wasn't there to begin with
    _ava = policy.filter(ava, 'urn:mace:umu.se:saml:roland:sp',
                         None, [gn, sn, mail])
 
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["givenName", "surName", "mail"])
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["givenName", "surName"])

src/p/y/pysaml2-2.0.0/tests/test_20_assertion.py   pysaml2(Download)
           "mail": "derek@example.com"}
 
    ava = r.filter(ava, "urn:mace:umu.se:saml:roland:sp", None, None)
    assert _eq(ava.keys(), ["givenName", "surName"])
 
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["givenName", "surName", "mail"])
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["givenName", "surName"])
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["mail"])
 
    # No restrictions apply
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", [], [])
 
    assert _eq(ava.keys(), ["mail"])

src/p/y/pysaml2-2.0.0/tests/test_37_entity_categories.py   pysaml2(Download)
           "mail": ["derek@nyy.mlb.com", "dj@example.com"], "c": ["USA"]}
 
    ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
 
    assert _eq(ava.keys(), ['mail', 'givenName', 'sn', 'c'])
           "eduPersonTargetedID": "foo!bar!xyz"}
 
    ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
 
    # Mismatch, policy deals with eduGAIN, metadata says SWAMID
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID', "norEduPersonNIN"])
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID', "givenName", "c", "mail",
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID'])

src/p/y/pysaml2-HEAD/tests/test_37_entity_categories.py   pysaml2(Download)
           "mail": ["derek@nyy.mlb.com", "dj@example.com"], "c": ["USA"]}
 
    ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
 
    assert _eq(ava.keys(), ['mail', 'givenName', 'sn', 'c'])
           "eduPersonTargetedID": "foo!bar!xyz"}
 
    ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
 
    # Mismatch, policy deals with eduGAIN, metadata says SWAMID
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID', "norEduPersonNIN"])
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID', "givenName", "c", "mail",
           "norEduPersonNIN": "19800101134"}
 
    ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp", mds)
 
    assert _eq(ava.keys(), ['eduPersonTargetedID'])