Skip to content

Commit c516f7b

Browse files
committed
fix capitalization & plurals
1 parent de746ba commit c516f7b

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

src/pyff/samlmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,16 +862,16 @@ def discojson(e, sources=None, langs=None, fallback_to_favicon=False, icon_store
862862
d['registrationAuthority'] = reg_auth
863863

864864
if categories is not None:
865-
d['entity_categories'] = categories
865+
d['entity_category'] = categories
866866

867867
if certifications is not None:
868-
d['assurance_certifications'] = certifications
868+
d['assurance_certification'] = certifications
869869

870870
if cat_support is not None:
871871
d['entity_category_support'] = cat_support
872872

873873
if sources is not None:
874-
d['md_sources'] = sources
874+
d['md_source'] = sources
875875

876876
eattr = entity_attribute_dict(e)
877877
if 'idp' in eattr[ATTRS['role']]:

src/pyff/schema/saml-metadata-trustinfo-v1.0.xsd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@
7272
<complexType name="TrustedEntitiesType">
7373
<simpleContent>
7474
<extension base="anyURI">
75-
<attribute name="match" type="ti:matchType" default="registrationAuthority"/>
75+
<attribute name="match" type="ti:MatchType" default="registrationAuthority"/>
7676
<attribute name="include" type="boolean" default="true"/>
7777
</extension>
7878
</simpleContent>
7979
</complexType>
80-
<simpleType name="matchType">
80+
<simpleType name="MatchType">
8181
<restriction base="string">
8282
<enumeration value="registrationAuthority"/>
83-
<enumeration value="entity_categories"/>
84-
<enumeration value="assurance_certifications"/>
83+
<enumeration value="entity_category"/>
84+
<enumeration value="assurance_certification"/>
8585
<enumeration value="entity_category_support"/>
86-
<enumeration value="md_sources"/>
86+
<enumeration value="md_source"/>
8787
</restriction>
8888
</simpleType>
8989

src/pyff/test/data/metadata/test-sp.xml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -598,27 +598,27 @@ YJIFVUg+VwfF8XvjH0WKszSmYywVYg==</ds:X509Certificate>
598598
<ti:DisplayName xml:lang="en">Customer Access</ti:DisplayName>
599599
<ti:DisplayName xml:lang="sv">Kundinloggning</ti:DisplayName>
600600
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
601-
<ti:TrustedEntities match="entity_categories">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
602-
<ti:TrustedEntities match="entity_categories">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
601+
<ti:TrustedEntities match="entity_category">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
602+
<ti:TrustedEntities match="entity_category">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
603603
</ti:TrustProfile>
604604
<ti:TrustProfile name="customer2" strict="false">
605605
<ti:DisplayName xml:lang="en">Customer 2 Access</ti:DisplayName>
606606
<ti:DisplayName xml:lang="sv">Kundinloggning 2</ti:DisplayName>
607607
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
608-
<ti:TrustedEntities match="entity_categories">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
609-
<ti:TrustedEntities match="entity_categories">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
608+
<ti:TrustedEntities match="entity_category">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
609+
<ti:TrustedEntities match="entity_category">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
610610
</ti:TrustProfile>
611611
<ti:TrustProfile name="customer3" strict="true">
612612
<ti:DisplayName xml:lang="en">Customer 3 Access</ti:DisplayName>
613613
<ti:DisplayName xml:lang="sv">Kundinloggning 3</ti:DisplayName>
614614
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
615-
<ti:TrustedEntities include="false" match="entity_categories">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
615+
<ti:TrustedEntities include="false" match="entity_category">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
616616
</ti:TrustProfile>
617617
<ti:TrustProfile name="customer4" strict="false">
618618
<ti:DisplayName xml:lang="en">Customer 4 Access</ti:DisplayName>
619619
<ti:DisplayName xml:lang="sv">Kundinloggning 4</ti:DisplayName>
620620
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
621-
<ti:TrustedEntities include="false" match="entity_categories">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
621+
<ti:TrustedEntities include="false" match="entity_category">http://refeds.org/category/research-and-scholarship</ti:TrustedEntities>
622622
</ti:TrustProfile>
623623
</ti:TrustInfo>
624624
<idpdisc:DiscoveryResponse Binding="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Location="https://box-idp.nordu.net/simplesaml/module.php/saml/sp/discoresp.php" index="1"/>
@@ -756,14 +756,26 @@ fbypb1DOrVI=</ds:X509Certificate>
756756
<ti:DisplayName xml:lang="sv">Kundinloggning 3</ti:DisplayName>
757757
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
758758
<ti:TrustedEntity include="false">https://login.idp.eduid.se/idp.xml</ti:TrustedEntity>
759-
<ti:TrustedEntities match="entity_categories">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
759+
<ti:TrustedEntities match="entity_category">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
760760
</ti:TrustProfile>
761761
<ti:TrustProfile name="customer4" strict="false">
762762
<ti:DisplayName xml:lang="en">Customer 4 Access</ti:DisplayName>
763763
<ti:DisplayName xml:lang="sv">Kundinloggning 4</ti:DisplayName>
764764
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
765765
<ti:TrustedEntity include="false">https://login.idp.eduid.se/idp.xml</ti:TrustedEntity>
766-
<ti:TrustedEntities match="entity_categories">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
766+
<ti:TrustedEntities match="entity_category">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
767+
</ti:TrustProfile>
768+
<ti:TrustProfile name="customer5" strict="true">
769+
<ti:DisplayName xml:lang="en">Customer 5 Access</ti:DisplayName>
770+
<ti:DisplayName xml:lang="sv">Kundinloggning 5</ti:DisplayName>
771+
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
772+
<ti:TrustedEntities match="entity_category_support">http://www.geant.net/uri/dataprotection-code-of-conduct/v1</ti:TrustedEntities>
773+
</ti:TrustProfile>
774+
<ti:TrustProfile name="customer6" strict="true">
775+
<ti:DisplayName xml:lang="en">Customer 6 Access</ti:DisplayName>
776+
<ti:DisplayName xml:lang="sv">Kundinloggning 6</ti:DisplayName>
777+
<ti:FallbackHandler profile="href">https://www.example.org/about</ti:FallbackHandler>
778+
<ti:TrustedEntities match="assurance_certification">https://refeds.org/sirtfi</ti:TrustedEntities>
767779
</ti:TrustProfile>
768780
</ti:TrustInfo>
769781
<idpdisc:DiscoveryResponse Binding="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Location="https://csucoast.infoready4.com/Shibboleth.sso/Login" index="1"/>

0 commit comments

Comments
 (0)