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 of
SignatureSigningConfiguration
.-
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
FieldsModifier and TypeFieldDescriptionprivate NamedKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances.private final org.slf4j.Logger
Class logger.Signature method algorithm URIs.private String
Signature canonicalization algorithm URI.private Integer
Signature HMAC output length.private String
The signature reference canonicalization transform algorithm.Digest method algorithm URIs.private List<Credential>
Signing credentials.Fields inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
DEFAULT_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the manager for named KeyInfoGenerator instances.Get the list of preferred signature algorithm URIs, in preference order.Get a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.Get the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm.Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.Get the list of digest method algorithm URIs suitable for use as a Signature Reference DigestMethod value, in preference order.Get the list of signing credentials to use when signing, in preference order.void
setKeyInfoGeneratorManager
(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances.void
setSignatureAlgorithms
(List<String> algorithms) Set the signature algorithms to use when signing.void
setSignatureCanonicalizationAlgorithm
(String algorithmURI) Set a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.void
setSignatureHMACOutputLength
(Integer length) Set the value to be used as the Signature SignatureMethod HMACOutputLength value, used only when signing with an HMAC algorithm.void
Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.void
setSignatureReferenceDigestMethods
(List<String> algorithms) Set a digest method algorithm URI suitable for use as a Signature Reference DigestMethod value.void
setSigningCredentials
(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 Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
signingCredentials
Signing credentials. -
signatureAlgorithms
Signature method algorithm URIs. -
signatureReferenceDigestMethods
Digest method algorithm URIs. -
signatureReferenceCanonicalizationAlgorithm
The signature reference canonicalization transform algorithm. -
signatureCanonicalization
Signature canonicalization algorithm URI. -
signatureHMACOutputLength
Signature HMAC output length. -
keyInfoGeneratorManager
Manager for named KeyInfoGenerator instances.
-
-
Constructor Details
-
BasicSignatureSigningConfiguration
public BasicSignatureSigningConfiguration()Constructor.
-
-
Method Details
-
getSigningCredentials
Get the list of signing credentials to use when signing, in preference order.- Specified by:
getSigningCredentials
in interfaceSignatureSigningConfiguration
- Returns:
- the list of signing credentials, may be empty
-
setSigningCredentials
Set the signing credentials to use when signing.- Parameters:
credentials
- the list of signing credentials
-
getSignatureAlgorithms
Get the list of preferred signature algorithm URIs, in preference order.- Specified by:
getSignatureAlgorithms
in interfaceSignatureSigningConfiguration
- Returns:
- the list of algorithm URIs, may be empty
-
setSignatureAlgorithms
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:
getSignatureReferenceDigestMethods
in interfaceSignatureSigningConfiguration
- Returns:
- a digest method algorithm URI
-
setSignatureReferenceDigestMethods
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
Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.- Specified by:
getSignatureReferenceCanonicalizationAlgorithm
in interfaceSignatureSigningConfiguration
- Returns:
- a digest method algorithm URI
-
setSignatureReferenceCanonicalizationAlgorithm
Get a canonicalization algorithm URI suitable for use as a Signature Reference Transform value.- Parameters:
uri
- a canonicalization algorithm URI
-
getSignatureCanonicalizationAlgorithm
Get a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.- Specified by:
getSignatureCanonicalizationAlgorithm
in interfaceSignatureSigningConfiguration
- Returns:
- a canonicalization algorithm URI
-
setSignatureCanonicalizationAlgorithm
Set a canonicalization algorithm URI suitable for use as a Signature CanonicalizationMethod value.- Parameters:
algorithmURI
- a canonicalization algorithm URI
-
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:
getSignatureHMACOutputLength
in interfaceSignatureSigningConfiguration
- Returns:
- the configured HMAC output length value
-
setSignatureHMACOutputLength
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
Get the manager for named KeyInfoGenerator instances.- Specified by:
getKeyInfoGeneratorManager
in interfaceSignatureSigningConfiguration
- Returns:
- the KeyInfoGenerator manager, or null if none is configured
-
setKeyInfoGeneratorManager
Set the manager for named KeyInfoGenerator instances.- Parameters:
keyInfoManager
- the KeyInfoGenerator manager to use
-