Package org.opensaml.xmlsec.impl
Class BasicSignatureSigningConfiguration
- java.lang.Object
-
- org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
-
- org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
-
- org.opensaml.xmlsec.impl.BasicSignatureSigningConfiguration
-
- All Implemented Interfaces:
AlgorithmPolicyConfiguration,SignatureSigningConfiguration,WhitelistBlacklistConfiguration
public class BasicSignatureSigningConfiguration extends BasicWhitelistBlacklistConfiguration implements SignatureSigningConfiguration
Basic implementation ofSignatureSigningConfiguration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
AlgorithmPolicyConfiguration.Precedence
-
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.WhitelistBlacklistConfiguration
WhitelistBlacklistConfiguration.Precedence
-
-
Field Summary
Fields Modifier and Type Field Description private NamedKeyInfoGeneratorManagerkeyInfoGeneratorManagerManager for named KeyInfoGenerator instances.private org.slf4j.LoggerlogClass logger.private List<String>signatureAlgorithmsSignature method algorithm URIs.private StringsignatureCanonicalizationSignature canonicalization algorithm URI.private IntegersignatureHMACOutputLengthSignature HMAC output length.private StringsignatureReferenceCanonicalizationAlgorithmThe signature reference canonicalization transform algorithm.private List<String>signatureReferenceDigestMethodsDigest method algorithm URIs.private List<Credential>signingCredentialsSigning credentials.-
Fields inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
DEFAULT_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description BasicSignatureSigningConfiguration()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedKeyInfoGeneratorManagergetKeyInfoGeneratorManager()Get the manager for named KeyInfoGenerator instances.List<String>getSignatureAlgorithms()Get the list of preferred signature algorithm URIs, in preference order.StringgetSignatureCanonicalizationAlgorithm()Get a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.IntegergetSignatureHMACOutputLength()Get the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm.StringgetSignatureReferenceCanonicalizationAlgorithm()Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.List<String>getSignatureReferenceDigestMethods()Get the list of digest method algorithm URIs suitable for use as a Signature Reference DigestMethod value, in preference order.List<Credential>getSigningCredentials()Get the list of signing credentials to use when signing, in preference order.voidsetKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager)Set the manager for named KeyInfoGenerator instances.voidsetSignatureAlgorithms(List<String> algorithms)Set the signature algorithms to use when signing.voidsetSignatureCanonicalizationAlgorithm(String algorithmURI)Set a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.voidsetSignatureHMACOutputLength(Integer length)Set the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm.voidsetSignatureReferenceCanonicalizationAlgorithm(String uri)Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.voidsetSignatureReferenceDigestMethods(List<String> algorithms)Set a digest method algorithm URI suitable for use as a Signature Reference DigestMethod value.voidsetSigningCredentials(List<Credential> credentials)Set the signing credentials to use when signing.-
Methods inherited from class org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
getBlacklistedAlgorithms, getWhitelistBlacklistPrecedence, getWhitelistedAlgorithms, isBlacklistMerge, isWhitelistMerge, setBlacklistedAlgorithms, setBlacklistMerge, setWhitelistBlacklistPrecedence, setWhitelistedAlgorithms, setWhitelistMerge
-
Methods inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMerge, setExcludedAlgorithms, setExcludeMerge, setIncludedAlgorithms, setIncludeExcludePrecedence, setIncludeMerge
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMerge
-
Methods inherited from interface org.opensaml.xmlsec.WhitelistBlacklistConfiguration
getBlacklistedAlgorithms, getWhitelistBlacklistPrecedence, getWhitelistedAlgorithms, isBlacklistMerge, isWhitelistMerge
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
signingCredentials
@Nonnull @NonnullElements private List<Credential> signingCredentials
Signing credentials.
-
signatureAlgorithms
@Nonnull @NonnullElements private List<String> signatureAlgorithms
Signature method algorithm URIs.
-
signatureReferenceDigestMethods
@Nonnull @NonnullElements private List<String> signatureReferenceDigestMethods
Digest method algorithm URIs.
-
signatureReferenceCanonicalizationAlgorithm
@Nullable private String signatureReferenceCanonicalizationAlgorithm
The signature reference canonicalization transform algorithm.
-
signatureCanonicalization
@Nullable private String signatureCanonicalization
Signature canonicalization algorithm URI.
-
signatureHMACOutputLength
@Nullable private Integer signatureHMACOutputLength
Signature HMAC output length.
-
keyInfoGeneratorManager
@Nullable private NamedKeyInfoGeneratorManager keyInfoGeneratorManager
Manager for named KeyInfoGenerator instances.
-
-
Method Detail
-
getSigningCredentials
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<Credential> getSigningCredentials()
Get the list of signing credentials to use when signing, in preference order.- Specified by:
getSigningCredentialsin interfaceSignatureSigningConfiguration- Returns:
- the list of signing credentials, may be empty
-
setSigningCredentials
public void setSigningCredentials(@Nullable @NonnullElements List<Credential> credentials)
Set the signing credentials to use when signing.- Parameters:
credentials- the list of signing credentials
-
getSignatureAlgorithms
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<String> getSignatureAlgorithms()
Get the list of preferred signature algorithm URIs, in preference order.- Specified by:
getSignatureAlgorithmsin interfaceSignatureSigningConfiguration- Returns:
- the list of algorithm URIs, may be empty
-
setSignatureAlgorithms
public void setSignatureAlgorithms(@Nullable @NonnullElements List<String> algorithms)
Set the signature algorithms to use when signing.- Parameters:
algorithms- the list of signature algorithms
-
getSignatureReferenceDigestMethods
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<String> getSignatureReferenceDigestMethods()
Get the list of digest method algorithm URIs suitable for use as a Signature Reference DigestMethod value, in preference order.- Specified by:
getSignatureReferenceDigestMethodsin interfaceSignatureSigningConfiguration- Returns:
- a digest method algorithm URI
-
setSignatureReferenceDigestMethods
public void setSignatureReferenceDigestMethods(@Nullable @NonnullElements List<String> algorithms)
Set a digest method algorithm URI suitable for use as a Signature Reference DigestMethod value.- Parameters:
algorithms- a list of digest method algorithm URIs
-
getSignatureReferenceCanonicalizationAlgorithm
@Nullable public String getSignatureReferenceCanonicalizationAlgorithm()
Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.- Specified by:
getSignatureReferenceCanonicalizationAlgorithmin interfaceSignatureSigningConfiguration- Returns:
- a digest method algorithm URI
-
setSignatureReferenceCanonicalizationAlgorithm
public void setSignatureReferenceCanonicalizationAlgorithm(@Nullable String uri)Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.- Parameters:
uri- a canonicalization algorithm URI
-
getSignatureCanonicalizationAlgorithm
@Nullable public String getSignatureCanonicalizationAlgorithm()
Get a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.- Specified by:
getSignatureCanonicalizationAlgorithmin interfaceSignatureSigningConfiguration- Returns:
- a canonicalization algorithm URI
-
setSignatureCanonicalizationAlgorithm
public void setSignatureCanonicalizationAlgorithm(@Nullable String algorithmURI)Set a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.- Parameters:
algorithmURI- a canonicalization algorithm URI
-
getSignatureHMACOutputLength
@Nullable public Integer getSignatureHMACOutputLength()
Get the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm. This value is optional when using HMAC.- Specified by:
getSignatureHMACOutputLengthin interfaceSignatureSigningConfiguration- Returns:
- the configured HMAC output length value
-
setSignatureHMACOutputLength
public void setSignatureHMACOutputLength(@Nullable Integer length)Set the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm. This value is optional when using HMAC.- Parameters:
length- the HMAC output length value to use when performing HMAC signing (may be null)
-
getKeyInfoGeneratorManager
@Nullable public NamedKeyInfoGeneratorManager getKeyInfoGeneratorManager()
Get the manager for named KeyInfoGenerator instances.- Specified by:
getKeyInfoGeneratorManagerin interfaceSignatureSigningConfiguration- Returns:
- the KeyInfoGenerator manager, or null if none is configured
-
setKeyInfoGeneratorManager
public void setKeyInfoGeneratorManager(@Nullable NamedKeyInfoGeneratorManager keyInfoManager)Set the manager for named KeyInfoGenerator instances.- Parameters:
keyInfoManager- the KeyInfoGenerator manager to use
-
-