Skip to content

Commit

Permalink
always keep entityID in some corner-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
leifj committed Apr 28, 2018
1 parent a7d37d8 commit b7e76c3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/pyff/xslt/eidas-cleanup.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,19 @@
</xsl:template>

<xsl:template name="eidas-attributes">
<samla:Attribute Name="https://pyff.io/eidas/endpoint_type">
<samla:AttributeValue><xsl:value-of select="$eidas_endpoint_type"/></samla:AttributeValue>
</samla:Attribute>
<samla:Attribute Name="https://pyff.io/eidas/territory">
<samla:AttributeValue><xsl:value-of select="$eidas_territory"/></samla:AttributeValue>
</samla:Attribute>
<xsl:if test="$eidas_endpoint_type and $eidas_territory">
<samla:Attribute Name="https://pyff.io/eidas/endpoint_type">
<samla:AttributeValue><xsl:value-of select="$eidas_endpoint_type"/></samla:AttributeValue>
</samla:Attribute>
<samla:Attribute Name="https://pyff.io/eidas/territory">
<samla:AttributeValue><xsl:value-of select="$eidas_territory"/></samla:AttributeValue>
</samla:Attribute>
</xsl:if>
</xsl:template>

<xsl:template match="md:EntityDescriptor[not(md:Extensions) and not(saml:Extensions)]">
<md:EntityDescriptor>
<md:Extensions/>
<xsl:attribute name="entityID"><xsl:value-of select="@entityID"></xsl:value-of></xsl:attribute>
<xsl:apply-templates/>
</md:EntityDescriptor>
</xsl:template>
Expand Down

0 comments on commit b7e76c3

Please sign in to comment.