Class URIContentReference
- java.lang.Object
-
- org.opensaml.xmlsec.signature.support.URIContentReference
-
- All Implemented Interfaces:
ConfigurableContentReference
,ContentReference
,TransformsConfigurableContentReference
- Direct Known Subclasses:
DocumentInternalIDContentReference
public class URIContentReference extends Object implements ConfigurableContentReference, TransformsConfigurableContentReference
A generic content reference that uses a URI to reference the content to be signed.The default digest algorithm used is
SignatureConstants.ALGO_ID_DIGEST_SHA256
.
-
-
Field Summary
Fields Modifier and Type Field Description private String
digestAlgorithm
Algorithm used to digest the content .private org.slf4j.Logger
log
Logger.private String
referenceID
Element reference ID.private List<String>
transforms
Transforms applied to the content.
-
Constructor Summary
Constructors Constructor Description URIContentReference(String refID)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
URIContentReference
public URIContentReference(@Nullable String refID)
Constructor. The anchor designator (#) must not be included in the ID.- Parameters:
refID
- the reference ID of the element to be signed
-
-
Method Detail
-
getTransforms
@Nonnull public List<String> getTransforms()
Gets the transforms applied to the content prior to digest generation.- Specified by:
getTransforms
in interfaceTransformsConfigurableContentReference
- Returns:
- the transforms applied to the content prior to digest generation
-
getDigestAlgorithm
@Nullable public String getDigestAlgorithm()
Gets the algorithm used to digest the content..- Specified by:
getDigestAlgorithm
in interfaceConfigurableContentReference
- Returns:
- the algorithm used to digest the content
-
setDigestAlgorithm
public void setDigestAlgorithm(@Nonnull String newAlgorithm)
Sets the algorithm used to digest the content..- Specified by:
setDigestAlgorithm
in interfaceConfigurableContentReference
- Parameters:
newAlgorithm
- the algorithm used to digest the content
-
createReference
public void createReference(@Nonnull org.apache.xml.security.signature.XMLSignature signature)
Called by the signature marshaller to allow references to be added to the signature.- Specified by:
createReference
in interfaceContentReference
- Parameters:
signature
- the signature object
-
-