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 StringdigestAlgorithmAlgorithm used to digest the content .private LoggerlogLogger.private StringreferenceIDElement reference ID.private List<String>transformsTransforms 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 voidcreateReference(XMLSignature signature)Called by the signature marshaller to allow references to be added to the signature.StringgetDigestAlgorithm()Gets the algorithm used to digest the content.List<String>getTransforms()Gets the transforms applied to the content prior to digest generation.voidsetDigestAlgorithm(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:
getTransformsin 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:
getDigestAlgorithmin 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:
setDigestAlgorithmin interfaceConfigurableContentReference- Parameters:
newAlgorithm- the algorithm used to digest the content
-
createReference
public void createReference(@Nonnull XMLSignature signature)Called by the signature marshaller to allow references to be added to the signature.- Specified by:
createReferencein interfaceContentReference- Parameters:
signature- the signature object
-
-