public class SAMLObjectContentReference extends Object implements ConfigurableContentReference
The default digest algorithm used is SignatureConstants.ALGO_ID_DIGEST_SHA256
.
The default set of transforms applied consists of SignatureConstants.TRANSFORM_ENVELOPED_SIGNATURE
and SignatureConstants.TRANSFORM_C14N_EXCL_WITH_COMMENTS
.
When generating an exclusive canonicalization transform, an inclusive namespace list is
generated from the namespaces, retrieved from XMLObject.getNamespaces()
,
used by the SAML object to be signed and all of it's descendants.
Note that the SAML specification states that: 1) an exclusive canonicalization transform (either with or without comments) SHOULD be used. 2) transforms other than enveloped signature and one of the two exclusive canonicalizations SHOULD NOT be used. Careful consideration should be made before deviating from these recommendations.
Constructor and Description |
---|
SAMLObjectContentReference(SignableSAMLObject newSignableObject)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createReference(org.apache.xml.security.signature.XMLSignature signature)
Called by the signature marshaller to allow references to be added to the signature.
|
String |
getDigestAlgorithm()
Gets the algorithm used to digest the content.
|
List<String> |
getTransforms()
Gets the transforms applied to the content prior to digest generation.
|
void |
setDigestAlgorithm(String newAlgorithm)
Sets the algorithm used to digest the content.
|
public SAMLObjectContentReference(@Nonnull SignableSAMLObject newSignableObject)
newSignableObject
- the SAMLObject this reference refers to@Nonnull @NonnullElements @Live public List<String> getTransforms()
@Nonnull @NotEmpty public String getDigestAlgorithm()
getDigestAlgorithm
in interface ConfigurableContentReference
public void setDigestAlgorithm(@Nonnull @NotEmpty String newAlgorithm)
setDigestAlgorithm
in interface ConfigurableContentReference
newAlgorithm
- the algorithm used to digest the contentpublic void createReference(@Nonnull org.apache.xml.security.signature.XMLSignature signature)
createReference
in interface ContentReference
signature
- the signature objectCopyright © 2016 JBoss by Red Hat. All rights reserved.