Created
November 6, 2012 15:35
-
-
Save riffm/4025458 to your computer and use it in GitHub Desktop.
c14n2 params example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sec:Security xmlns:sec="urn:sec" xmlns:wsu="urn:wsu" xmlns:wsse="urn:wsse" | |
xmlns:ds="urn:ds"> | |
<wsu:Timestamp wsu:Id="TIMESTAMP"> | |
<wsu:Created wsu:Id="CREATED">2012-11-07T15:52:00</wsu:Created> | |
</wsu:Timestamp> | |
<wsse:BinarySecurityToken EncodingType="http://www.ietf.org/rfc/rfc4648.txt" | |
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" | |
wsu:Id="TOKEN"> | |
TOKEN_VALUE | |
</wsse:BinarySecurityToken> | |
<sec:Signature> | |
<c14n2:CanonizationParameters xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" | |
c14n2:ID="CanonizationParameters"> | |
<c14n2:IgnoreComments>true</c14n2:IgnoreComments> | |
<c14n2:TrimTextNodes>true</c14n2:TrimTextNodes> | |
<c14n2:PrefixRewrite>sequential</c14n2:PrefixRewrite> | |
<c14n2:QNameAware> | |
<c14n2:Element Name="ReferenceQName" NS="urn:addressing"/> | |
<c14n2:Element Name="Faultcode" NS="urn:faults"/> | |
</c14n2:QNameAware> | |
</c14n2:CanonizationParameters> | |
<ds:SignedInfo> | |
<ds:CanonizationMethod Algorithm="http://www.w3.org/2010/xml-c14n2" | |
ParametersURI="#CanonizationParameters"/> | |
<ds:SignatureMethod Algorithm="urn:algo"/> | |
<ds:Reference URI="#MessageBody"> | |
<ds:Transforms> | |
<ds:Transform Algorithm="http://www.w3.org/2010/xml-c14n2" | |
ParametersURI="#CanonizationParameters"/> | |
</ds:Transforms> | |
<ds:DigestMethod Algorithm="urn:algo"/> | |
<ds:DigestValue>DIGEST</ds:DigestValue> | |
</ds:Reference> | |
</ds:SignedInfo> | |
<ds:SignatureValue>SIGNATURE</ds:SignatureValue> | |
<sec:KeyInfo> | |
<wsse:SecurityTokenReference> | |
<wsse:Reference URI="#TOKEN"/> | |
</wsse:SecurityTokenReference> | |
</sec:KeyInfo> | |
</sec:Signature> | |
</sec:Security> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns="http://www.w3.org/2010/xml-c14n2" | |
targetNamespace="http://www.w3.org/2010/xml-c14n2" | |
version="0.1" elementFormDefault="qualified"> | |
<xs:element name="IgnoreComments" type="xs:boolean"/> | |
<xs:element name="TrimTextNodes" type="xs:boolean"/> | |
<xs:element name="PrefixRewrite"> | |
<xs:simpleType> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="none"/> | |
<xs:enumeration value="sequential"/> | |
<xs:enumeration value="derived"/> | |
</xs:restriction> | |
</xs:simpleType> | |
</xs:element> | |
<xs:element name="QNameAware"> | |
<xs:complexType> | |
<xs:choice maxOccurs="unbounded"> | |
<xs:element ref="Element"/> | |
<xs:element ref="XPathElement"/> | |
<xs:element ref="QualifiedAttr"/> | |
<xs:element ref="UnqualifiedAttr"/> | |
<xs:choice> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="Element"> | |
<xs:complexType> | |
<xs:attribute name="Name" type="xs:NCName" use="required"/> | |
<xs:attribute name="NS" type="xs:anyURI"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="QualifiedAttr"> | |
<xs:complexType> | |
<xs:attribute name="Name" type="xs:NCName" use="required"/> | |
<xs:attribute name="NS" type="xs:anyURI"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="UnqualifiedAttr"> | |
<xs:complexType> | |
<xs:attribute name="Name" type="xs:NCName" use="required"/> | |
<xs:attribute name="ParentName" type="xs:NCName" use="required"/> | |
<xs:attribute name="ParentNS" type="xs:anyURI"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:element name="XPathElement"> | |
<xs:complexType> | |
<xs:attribute name="Name" type="xs:NCName" use="required"/> | |
<xs:attribute name="NS" type="xs:anyURI"/> | |
</xs:complexType> | |
</xs:element> | |
<xs:attribute name="ID" type="xsd:ID"> | |
<xs:element name="CanonizationParameters"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="IgnoreComments"/> | |
<xs:element ref="TrimTextNodes"/> | |
<xs:element ref="PrefixRewrite"/> | |
<xs:element ref="QNameAware"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:attribute name="ID" ref="c14n2:ID" use="required"/> | |
<xs:element> | |
</schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment