Package org.apache.wss4j.dom.handler
Class RequestData
- java.lang.Object
-
- org.apache.wss4j.dom.handler.RequestData
-
public class RequestData extends Object
This class holds per request data.
-
-
Constructor Summary
Constructors Constructor Description RequestData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetActor()AlgorithmSuitegetAlgorithmSuite()CallbackHandlergetAttachmentCallbackHandler()List<String>getAudienceRestrictions()Get the Audience RestrictionsBSPEnforcergetBSPEnforcer()CallbackHandlergetCallbackHandler()Returns the CallbackHandler used for this request.CryptogetDecCrypto()intgetDerivedKeyIterations()Get the derived key iterations.StringgetDerivedKeyTokenReference()org.apache.xml.security.encryption.SerializergetEncryptionSerializer()EncryptionActionTokengetEncryptionToken()Collection<Pattern>getIssuerDNPatterns()Get the Signature Issuer DN Cert ConstraintsObjectgetMsgContext()ReplayCachegetNonceReplayCache()Get the replay cache for NoncesintgetOriginalSignatureActionPosition()PasswordEncryptorgetPasswordEncryptor()StringgetPwType()StringgetRequiredPasswordType()AlgorithmSuitegetSamlAlgorithmSuite()ReplayCachegetSamlOneTimeUseReplayCache()Get the replay cache for SAML2 OneTimeUse AssertionsWSSecHeadergetSecHeader()ProvidergetSignatureProvider()SignatureActionTokengetSignatureToken()List<byte[]>getSignatureValues()CryptogetSigVerCrypto()SOAPConstantsgetSoapConstants()Collection<Pattern>getSubjectCertConstraints()Get the Signature Subject Cert ConstraintsintgetTimeStampFutureTTL()ReplayCachegetTimestampReplayCache()Get the replay cache for TimestampsintgetTimeStampTTL()Certificate[]getTlsCerts()StringgetUsername()intgetUtFutureTTL()intgetUtTTL()ValidatorgetValidator(QName qName)Get the Validator instance corresponding to the QNameWSDocInfogetWsDocInfo()WSSConfiggetWssConfig()booleanisAddInclusivePrefixes()booleanisAddUsernameTokenCreated()booleanisAddUsernameTokenNonce()booleanisAllowNamespaceQualifiedPasswordTypes()booleanisAllowRSA15KeyTransportAlgorithm()booleanisAllowUsernameTokenNoPassword()booleanisAppendSignatureAfterTimestamp()booleanisDisableBSPEnforcement()booleanisEnableSignatureConfirmation()booleanisEncodePasswords()booleanisExpandXopInclude()booleanisHandleCustomPasswordTypes()booleanisPrecisionInMilliSeconds()booleanisRequireSignedEncryptedDataElements()booleanisRequireTimestampExpires()booleanisRevocationEnabled()Get whether to enable CRL checking or not when verifying trust in a certificate.booleanisStoreBytesInAttachment()booleanisTimeStampStrict()booleanisUse200512Namespace()booleanisUseDerivedKeyForMAC()Whether to use the derived key for a MAC.booleanisValidateSamlSubjectConfirmation()voidsetActor(String actor)voidsetAddInclusivePrefixes(boolean addInclusivePrefixes)voidsetAddUsernameTokenCreated(boolean addUsernameTokenCreated)voidsetAddUsernameTokenNonce(boolean addUsernameTokenNonce)voidsetAlgorithmSuite(AlgorithmSuite algorithmSuite)voidsetAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedPasswordTypes)voidsetAllowRSA15KeyTransportAlgorithm(boolean allowRSA15KeyTransportAlgorithm)voidsetAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword)voidsetAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)voidsetAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)voidsetAudienceRestrictions(List<String> audienceRestrictions)Set the Audience RestrictionsvoidsetCallbackHandler(CallbackHandler cb)Sets the CallbackHandler used for this requestvoidsetDecCrypto(Crypto decCrypto)voidsetDerivedKeyIterations(int iterations)Set the derived key iterations.voidsetDerivedKeyTokenReference(String derivedKeyTokenReference)voidsetDisableBSPEnforcement(boolean disableBSPEnforcement)voidsetEnableRevocation(boolean enableRevocation)Set whether to enable CRL checking or not when verifying trust in a certificate.voidsetEnableSignatureConfirmation(boolean enableSignatureConfirmation)voidsetEncodePasswords(boolean encodePasswords)voidsetEncryptionSerializer(org.apache.xml.security.encryption.Serializer encryptionSerializer)voidsetEncryptionToken(EncryptionActionToken encryptionToken)voidsetExpandXopInclude(boolean expandXopInclude)voidsetHandleCustomPasswordTypes(boolean handleCustomPasswordTypes)voidsetIgnoredBSPRules(List<BSPRule> bspRules)voidsetIssuerDNPatterns(Collection<Pattern> issuerDNPatterns)Set the Signature Issuer DN Cert ConstraintsvoidsetMsgContext(Object msgContext)voidsetNonceReplayCache(ReplayCache newCache)Set the replay cache for NoncesvoidsetOriginalSignatureActionPosition(int originalSignatureActionPosition)voidsetPasswordEncryptor(PasswordEncryptor passwordEncryptor)voidsetPrecisionInMilliSeconds(boolean precisionInMilliSeconds)voidsetPwType(String pwType)voidsetRequiredPasswordType(String requiredPasswordType)voidsetRequireSignedEncryptedDataElements(boolean requireSignedEncryptedDataElements)Configure the engine to verify that EncryptedData elements are in a signed subtree of the document.voidsetRequireTimestampExpires(boolean requireTimestampExpires)voidsetSamlAlgorithmSuite(AlgorithmSuite samlAlgorithmSuite)voidsetSamlOneTimeUseReplayCache(ReplayCache newCache)Set the replay cache for SAML2 OneTimeUse AssertionsvoidsetSecHeader(WSSecHeader secHeader)voidsetSignatureProvider(Provider signatureProvider)Set a security Provider instance to use for SignaturevoidsetSignatureToken(SignatureActionToken signatureToken)voidsetSigVerCrypto(Crypto sigVerCrypto)voidsetSoapConstants(SOAPConstants soapConstants)voidsetStoreBytesInAttachment(boolean storeBytesInAttachment)voidsetSubjectCertConstraints(Collection<Pattern> subjectCertConstraints)Set the Signature Subject Cert ConstraintsvoidsetTimeStampFutureTTL(int timeStampFutureTTL)voidsetTimestampReplayCache(ReplayCache newCache)Set the replay cache for TimestampsvoidsetTimeStampStrict(boolean timeStampStrict)voidsetTimeStampTTL(int timeStampTTL)voidsetTlsCerts(Certificate[] tlsCerts)voidsetUse200512Namespace(boolean use200512Namespace)voidsetUseDerivedKeyForMAC(boolean useMac)Whether to use the derived key for a MAC.voidsetUsername(String username)voidsetUtFutureTTL(int utFutureTTL)voidsetUtTTL(int utTTL)voidsetValidateSamlSubjectConfirmation(boolean validateSamlSubjectConfirmation)voidsetWsDocInfo(WSDocInfo wsDocInfo)voidsetWssConfig(WSSConfig wssConfig)
-
-
-
Method Detail
-
getMsgContext
public Object getMsgContext()
-
setMsgContext
public void setMsgContext(Object msgContext)
-
getSoapConstants
public SOAPConstants getSoapConstants()
-
setSoapConstants
public void setSoapConstants(SOAPConstants soapConstants)
-
getActor
public String getActor()
-
setActor
public void setActor(String actor)
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String username)
-
getPwType
public String getPwType()
-
setPwType
public void setPwType(String pwType)
-
getSigVerCrypto
public Crypto getSigVerCrypto()
-
setSigVerCrypto
public void setSigVerCrypto(Crypto sigVerCrypto)
-
getDecCrypto
public Crypto getDecCrypto()
-
setDecCrypto
public void setDecCrypto(Crypto decCrypto)
-
getWssConfig
public WSSConfig getWssConfig()
- Returns:
- Returns the wssConfig.
-
setWssConfig
public void setWssConfig(WSSConfig wssConfig)
- Parameters:
wssConfig- The wssConfig to set.
-
getSignatureValues
public List<byte[]> getSignatureValues()
- Returns:
- Returns the list of stored signature values.
-
getSecHeader
public WSSecHeader getSecHeader()
- Returns:
- Returns the secHeader.
-
setSecHeader
public void setSecHeader(WSSecHeader secHeader)
- Parameters:
secHeader- The secHeader to set.
-
setDerivedKeyIterations
public void setDerivedKeyIterations(int iterations)
Set the derived key iterations. Default is 1000.- Parameters:
iterations- The number of iterations to use when deriving a key
-
getDerivedKeyIterations
public int getDerivedKeyIterations()
Get the derived key iterations.- Returns:
- The number of iterations to use when deriving a key
-
setUseDerivedKeyForMAC
public void setUseDerivedKeyForMAC(boolean useMac)
Whether to use the derived key for a MAC.- Parameters:
useMac- Whether to use the derived key for a MAC.
-
isUseDerivedKeyForMAC
public boolean isUseDerivedKeyForMAC()
Whether to use the derived key for a MAC.- Returns:
- Whether to use the derived key for a MAC.
-
setEnableRevocation
public void setEnableRevocation(boolean enableRevocation)
Set whether to enable CRL checking or not when verifying trust in a certificate.- Parameters:
enableRevocation- whether to enable CRL checking
-
isRevocationEnabled
public boolean isRevocationEnabled()
Get whether to enable CRL checking or not when verifying trust in a certificate.- Returns:
- whether to enable CRL checking
-
isRequireSignedEncryptedDataElements
public boolean isRequireSignedEncryptedDataElements()
- Returns:
- whether EncryptedData elements are required to be signed
-
setRequireSignedEncryptedDataElements
public void setRequireSignedEncryptedDataElements(boolean requireSignedEncryptedDataElements)
Configure the engine to verify that EncryptedData elements are in a signed subtree of the document. This can be used to prevent some wrapping based attacks when encrypt-before-sign token protection is selected.- Parameters:
requireSignedEncryptedDataElements-
-
setCallbackHandler
public void setCallbackHandler(CallbackHandler cb)
Sets the CallbackHandler used for this request- Parameters:
cb-
-
getCallbackHandler
public CallbackHandler getCallbackHandler()
Returns the CallbackHandler used for this request.- Returns:
- the CallbackHandler used for this request.
-
getAttachmentCallbackHandler
public CallbackHandler getAttachmentCallbackHandler()
-
setAttachmentCallbackHandler
public void setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)
-
getValidator
public Validator getValidator(QName qName) throws WSSecurityException
Get the Validator instance corresponding to the QName- Parameters:
qName- the QName with which to find a Validator instance- Returns:
- the Validator instance corresponding to the QName
- Throws:
WSSecurityException
-
setTimestampReplayCache
public void setTimestampReplayCache(ReplayCache newCache)
Set the replay cache for Timestamps
-
getTimestampReplayCache
public ReplayCache getTimestampReplayCache() throws WSSecurityException
Get the replay cache for Timestamps- Throws:
WSSecurityException
-
setNonceReplayCache
public void setNonceReplayCache(ReplayCache newCache)
Set the replay cache for Nonces
-
getNonceReplayCache
public ReplayCache getNonceReplayCache() throws WSSecurityException
Get the replay cache for Nonces- Throws:
WSSecurityException
-
setSamlOneTimeUseReplayCache
public void setSamlOneTimeUseReplayCache(ReplayCache newCache)
Set the replay cache for SAML2 OneTimeUse Assertions
-
getSamlOneTimeUseReplayCache
public ReplayCache getSamlOneTimeUseReplayCache() throws WSSecurityException
Get the replay cache for SAML2 OneTimeUse Assertions- Throws:
WSSecurityException
-
setSubjectCertConstraints
public void setSubjectCertConstraints(Collection<Pattern> subjectCertConstraints)
Set the Signature Subject Cert Constraints
-
getSubjectCertConstraints
public Collection<Pattern> getSubjectCertConstraints()
Get the Signature Subject Cert Constraints
-
getIssuerDNPatterns
public Collection<Pattern> getIssuerDNPatterns()
Get the Signature Issuer DN Cert Constraints- Returns:
-
setIssuerDNPatterns
public void setIssuerDNPatterns(Collection<Pattern> issuerDNPatterns)
Set the Signature Issuer DN Cert Constraints
-
setAudienceRestrictions
public void setAudienceRestrictions(List<String> audienceRestrictions)
Set the Audience Restrictions
-
getBSPEnforcer
public BSPEnforcer getBSPEnforcer()
-
isAppendSignatureAfterTimestamp
public boolean isAppendSignatureAfterTimestamp()
-
setAppendSignatureAfterTimestamp
public void setAppendSignatureAfterTimestamp(boolean appendSignatureAfterTimestamp)
-
getAlgorithmSuite
public AlgorithmSuite getAlgorithmSuite()
-
setAlgorithmSuite
public void setAlgorithmSuite(AlgorithmSuite algorithmSuite)
-
getSamlAlgorithmSuite
public AlgorithmSuite getSamlAlgorithmSuite()
-
setSamlAlgorithmSuite
public void setSamlAlgorithmSuite(AlgorithmSuite samlAlgorithmSuite)
-
getOriginalSignatureActionPosition
public int getOriginalSignatureActionPosition()
-
setOriginalSignatureActionPosition
public void setOriginalSignatureActionPosition(int originalSignatureActionPosition)
-
isDisableBSPEnforcement
public boolean isDisableBSPEnforcement()
-
setDisableBSPEnforcement
public void setDisableBSPEnforcement(boolean disableBSPEnforcement)
-
isAllowRSA15KeyTransportAlgorithm
public boolean isAllowRSA15KeyTransportAlgorithm()
-
setAllowRSA15KeyTransportAlgorithm
public void setAllowRSA15KeyTransportAlgorithm(boolean allowRSA15KeyTransportAlgorithm)
-
getTlsCerts
public Certificate[] getTlsCerts()
-
setTlsCerts
public void setTlsCerts(Certificate[] tlsCerts)
-
getPasswordEncryptor
public PasswordEncryptor getPasswordEncryptor()
-
setPasswordEncryptor
public void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
-
getSignatureToken
public SignatureActionToken getSignatureToken()
-
setSignatureToken
public void setSignatureToken(SignatureActionToken signatureToken)
-
getEncryptionToken
public EncryptionActionToken getEncryptionToken()
-
setEncryptionToken
public void setEncryptionToken(EncryptionActionToken encryptionToken)
-
getDerivedKeyTokenReference
public String getDerivedKeyTokenReference()
-
setDerivedKeyTokenReference
public void setDerivedKeyTokenReference(String derivedKeyTokenReference)
-
isUse200512Namespace
public boolean isUse200512Namespace()
-
setUse200512Namespace
public void setUse200512Namespace(boolean use200512Namespace)
-
isRequireTimestampExpires
public boolean isRequireTimestampExpires()
-
setRequireTimestampExpires
public void setRequireTimestampExpires(boolean requireTimestampExpires)
-
isValidateSamlSubjectConfirmation
public boolean isValidateSamlSubjectConfirmation()
-
setValidateSamlSubjectConfirmation
public void setValidateSamlSubjectConfirmation(boolean validateSamlSubjectConfirmation)
-
isAllowNamespaceQualifiedPasswordTypes
public boolean isAllowNamespaceQualifiedPasswordTypes()
-
setAllowNamespaceQualifiedPasswordTypes
public void setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedPasswordTypes)
-
getUtFutureTTL
public int getUtFutureTTL()
-
setUtFutureTTL
public void setUtFutureTTL(int utFutureTTL)
-
isHandleCustomPasswordTypes
public boolean isHandleCustomPasswordTypes()
-
setHandleCustomPasswordTypes
public void setHandleCustomPasswordTypes(boolean handleCustomPasswordTypes)
-
getUtTTL
public int getUtTTL()
-
setUtTTL
public void setUtTTL(int utTTL)
-
getTimeStampTTL
public int getTimeStampTTL()
-
setTimeStampTTL
public void setTimeStampTTL(int timeStampTTL)
-
getTimeStampFutureTTL
public int getTimeStampFutureTTL()
-
setTimeStampFutureTTL
public void setTimeStampFutureTTL(int timeStampFutureTTL)
-
isAllowUsernameTokenNoPassword
public boolean isAllowUsernameTokenNoPassword()
-
setAllowUsernameTokenNoPassword
public void setAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword)
-
isTimeStampStrict
public boolean isTimeStampStrict()
-
setTimeStampStrict
public void setTimeStampStrict(boolean timeStampStrict)
-
isAddInclusivePrefixes
public boolean isAddInclusivePrefixes()
-
setAddInclusivePrefixes
public void setAddInclusivePrefixes(boolean addInclusivePrefixes)
-
isPrecisionInMilliSeconds
public boolean isPrecisionInMilliSeconds()
-
setPrecisionInMilliSeconds
public void setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
-
isEnableSignatureConfirmation
public boolean isEnableSignatureConfirmation()
-
setEnableSignatureConfirmation
public void setEnableSignatureConfirmation(boolean enableSignatureConfirmation)
-
getRequiredPasswordType
public String getRequiredPasswordType()
-
setRequiredPasswordType
public void setRequiredPasswordType(String requiredPasswordType)
-
isEncodePasswords
public boolean isEncodePasswords()
-
setEncodePasswords
public void setEncodePasswords(boolean encodePasswords)
-
isStoreBytesInAttachment
public boolean isStoreBytesInAttachment()
-
setStoreBytesInAttachment
public void setStoreBytesInAttachment(boolean storeBytesInAttachment)
-
isExpandXopInclude
public boolean isExpandXopInclude()
-
setExpandXopInclude
public void setExpandXopInclude(boolean expandXopInclude)
-
getEncryptionSerializer
public org.apache.xml.security.encryption.Serializer getEncryptionSerializer()
-
setEncryptionSerializer
public void setEncryptionSerializer(org.apache.xml.security.encryption.Serializer encryptionSerializer)
-
isAddUsernameTokenCreated
public boolean isAddUsernameTokenCreated()
-
setAddUsernameTokenCreated
public void setAddUsernameTokenCreated(boolean addUsernameTokenCreated)
-
isAddUsernameTokenNonce
public boolean isAddUsernameTokenNonce()
-
setAddUsernameTokenNonce
public void setAddUsernameTokenNonce(boolean addUsernameTokenNonce)
-
getWsDocInfo
public WSDocInfo getWsDocInfo()
-
setWsDocInfo
public void setWsDocInfo(WSDocInfo wsDocInfo)
-
getSignatureProvider
public Provider getSignatureProvider()
-
setSignatureProvider
public void setSignatureProvider(Provider signatureProvider)
Set a security Provider instance to use for Signature
-
-