Skip to content

Commit

Permalink
add eduPersonEntitlement attribute to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlundberg committed Dec 11, 2023
1 parent 11e024d commit 0f76e3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/auth_server/tests/test_saml_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def setUp(self) -> None:
surname="Testsson",
targeted_id="https://idp.example.com/simplesaml/saml2/idp/metadata.php!http://test.localhost/saml2-metadata!398f4967ef4ec07985d93a9200d3891184b9c0f6c79db53280894ae75673eab8",
unique_id="[email protected]",
entitlement=[
"urn:mace:swamid.se:example.com:role:member",
],
),
)

Expand Down Expand Up @@ -171,12 +174,15 @@ def setUp(self) -> None:
</saml:Attribute>
<saml:Attribute Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="mail">
<saml:AttributeValue xsi:type="xs:string">[email protected]</saml:AttributeValue>
</saml:Attribute>
</saml:Attribute>
<saml:Attribute Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="eduPersonTargetedID">
<saml:AttributeValue>
<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="https://idp.example.com/simplesaml/saml2/idp/metadata.php" SPNameQualifier="http://test.localhost/saml2-metadata">398f4967ef4ec07985d93a9200d3891184b9c0f6c79db53280894ae75673eab8</saml:NameID>
</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.7" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="eduPersonEntitlement">
<saml:AttributeValue xsi:type="xs:string">urn:mace:swamid.se:example.com:role:member</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>"""
Expand Down

0 comments on commit 0f76e3b

Please sign in to comment.