Package org.apache.ws.security.message
Class WSBaseMessage
java.lang.Object
org.apache.ws.security.message.WSBaseMessage
- Direct Known Subclasses:
WSAddSignatureConfirmation
,WSAddTimestamp
,WSEncryptBody
,WSSAddSAMLToken
,WSSAddUsernameToken
,WSSignEnvelope
This is the base class for WS Security messages. It provides common functions
and fields used by the specific message classes such as sign, encrypt, and
username token.
- Author:
- Werner Dittmann (Werner.Dittmann@t-online.de)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WSBaseMessage
(String actor) Deprecated.replaced byWSSecBase()
andWSSecHeader
for actor specification.WSBaseMessage
(String actor, boolean mu) Deprecated.replaced byWSSecBase()
andWSSecHeader
for actor and mustunderstand specification. -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.replaced byWSSecBase.getKeyIdentifierType()
protected Element
Deprecated.replaced byWSSecHeader.insertSecurityHeader(Document)
void
Deprecated.replaced byWSSecHeader.setActor(String)
protected String
Deprecated.replaced byWSSecBase.setBodyID(Document)
void
setKeyIdentifierType
(int keyIdType) Deprecated.replaced byWSSecBase.setKeyIdentifierType(int)
void
setMustUnderstand
(boolean mu) Deprecated.replaced byWSSecHeader.setMustUnderstand(boolean)
void
Deprecated.replaced byWSSecBase.setParts(Vector)
void
setTimeToLive
(int ttl) Deprecated.replaced byWSSecTimestamp.setTimeToLive(int)
void
setUserInfo
(String user, String password) Deprecated.replaced byWSSecBase.setUserInfo(String, String)
void
setWsConfig
(WSSConfig wsConfig) Deprecated.replaced byWSSecBase.setWsConfig(WSSConfig)
protected String
-
Field Details
-
actor
-
mustunderstand
protected boolean mustunderstand -
user
-
password
-
keyIdentifierType
protected int keyIdentifierType -
parts
-
timeToLive
protected int timeToLive -
doDebug
protected boolean doDebug -
wssConfig
-
-
Constructor Details
-
WSBaseMessage
public WSBaseMessage()Deprecated.replaced byWSSecBase()
Constructor. -
WSBaseMessage
Deprecated.replaced byWSSecBase()
andWSSecHeader
for actor specification.Constructor.- Parameters:
actor
- The actor name of thewsse:Security
header
-
WSBaseMessage
Deprecated.replaced byWSSecBase()
andWSSecHeader
for actor and mustunderstand specification.Constructor.- Parameters:
actor
- The actor name of thewsse:Security
headermu
- SetmustUnderstand
to true or false
-
-
Method Details
-
setActor
Deprecated.replaced byWSSecHeader.setActor(String)
set actor name.- Parameters:
act
- The actor name of thewsse:Security
header
-
setTimeToLive
public void setTimeToLive(int ttl) Deprecated.replaced byWSSecTimestamp.setTimeToLive(int)
Set the time to live. This is the time difference in seconds between theCreated
and theExpires
inTimestamp
.- Parameters:
ttl
- The time to live in second
-
setParts
Deprecated.replaced byWSSecBase.setParts(Vector)
Set which parts of the message to encrypt/sign.- Parameters:
parts
- The vector containing the WSEncryptionPart objects
-
setMustUnderstand
public void setMustUnderstand(boolean mu) Deprecated.replaced byWSSecHeader.setMustUnderstand(boolean)
Set themustUnderstand
flag for thewsse:Security
header- Parameters:
mu
- SetmustUnderstand
to true or false
-
setKeyIdentifierType
public void setKeyIdentifierType(int keyIdType) Deprecated.replaced byWSSecBase.setKeyIdentifierType(int)
Sets which key identifier to use. Defines the key identifier type to use in thesignature
or theecnryption
function to set up the key identification elements.- Parameters:
keyIdType
-- See Also:
-
getKeyIdentifierType
public int getKeyIdentifierType()Deprecated.replaced byWSSecBase.getKeyIdentifierType()
Gets the value of thekeyIdentifyerType
.- Returns:
- The
keyIdentifyerType
. - See Also:
-
setWsConfig
Deprecated.replaced byWSSecBase.setWsConfig(WSSConfig)
- Parameters:
wsConfig
- The wsConfig to set.
-
setBodyID
Deprecated.replaced byWSSecBase.setBodyID(Document)
Looks up or adds a body id. First try to locate thewsu:Id
in the SOAP body element. If one is found, the value of thewsu:Id
attribute is returned. Otherwise the methode generates a newwsu:Id
and an appropriate value.- Parameters:
doc
- The SOAP envelope asDocument
- Returns:
- The value of the
wsu:Id
attribute of the SOAP body - Throws:
Exception
-
setWsuId
-
setUserInfo
Deprecated.replaced byWSSecBase.setUserInfo(String, String)
Set the user and password info. Both information is used to get the user's private signing key.- Parameters:
user
- This is the user's alias name in the keystore that identifies the private key to sign the documentpassword
- The user's password to get the private signing key from the keystore
-
insertSecurityHeader
Deprecated.replaced byWSSecHeader.insertSecurityHeader(Document)
Creates a security header and inserts it as child into the SOAP Envelope. Check if a WS Security header block for an actor is already available in the document. If a header block is found return it, otherwise a new wsse:Security header block is created and the attributes set- Parameters:
doc
- A SOAP envelope asDocument
- Returns:
- A
wsse:Security
element
-
WSSecBase()