Class WSSAddUsernameToken
java.lang.Object
org.apache.ws.security.message.WSBaseMessage
org.apache.ws.security.message.WSSAddUsernameToken
Builds a WS UsernameToken and inserts it into the SOAP Envelope.
Refer to the WS specification, UsernameToken profile
- Author:
- Werner Dittmann (Werner.Dittmann@siemens.com).
-
Field Summary
Fields inherited from class WSBaseMessage
actor, doDebug, keyIdentifierType, mustunderstand, parts, password, timeToLive, user, wssConfig -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WSSAddUsernameToken(String actor) Deprecated.replaced byWSSecUsernameToken()andWSSecHeaderfor actor specification.WSSAddUsernameToken(String actor, boolean mu) Deprecated.replaced byWSSecUsernameToken()andWSSecHeaderfor actor and mustunderstand specification. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCreated(Document doc) Deprecated.replaced byWSSecUsernameToken.addCreated()voidDeprecated.replaced byWSSecUsernameToken.addNonce()Deprecated.getId()Deprecated.replaced byWSSecUsernameToken.getId()byte[]Deprecated.replaced byWSSecUsernameToken.getSecretKey()preSetUsernameToken(Document doc, String username, String password) voidDeprecated.no replacement, id is created by default inWSSecUsernameTokenvoidsetPasswordType(String pwType) Deprecated.replaced byWSSecUsernameToken.setPasswordType(String)Methods inherited from class WSBaseMessage
getKeyIdentifierType, insertSecurityHeader, setActor, setBodyID, setKeyIdentifierType, setMustUnderstand, setParts, setTimeToLive, setUserInfo, setWsConfig, setWsuId
-
Constructor Details
-
WSSAddUsernameToken
-
WSSAddUsernameToken
Deprecated.replaced byWSSecUsernameToken()andWSSecHeaderfor actor specification.Constructor.- Parameters:
actor- the name of the actor of thewsse:Securityheader
-
WSSAddUsernameToken
Deprecated.replaced byWSSecUsernameToken()andWSSecHeaderfor actor and mustunderstand specification.Constructor.- Parameters:
actor- The name of the actor of thewsse:Securityheadermu- SetmustUnderstandto true or false
-
-
Method Details
-
setPasswordType
Deprecated.replaced byWSSecUsernameToken.setPasswordType(String)Defines how to construct the password element of theUsernameToken.- Parameters:
pwType- contains the password type. Only allowed values areWSConstants.PASSWORD_DIGESTandWSConstants.PASSWORD_TEXT.
-
addNonce
Deprecated.replaced byWSSecUsernameToken.addNonce()Creates and adds a Nonce element to the UsernameToken. -
addCreated
Deprecated.replaced byWSSecUsernameToken.addCreated()Creates and adds a Created element to the UsernameToken. -
setId
Deprecated.no replacement, id is created by default inWSSecUsernameTokenset the id- Parameters:
id-
-
getSecretKey
public byte[] getSecretKey()Deprecated.replaced byWSSecUsernameToken.getSecretKey()Get a secret key derived from values in UsernameToken.- Returns:
-
getId
-
preSetUsernameToken
-
build
Deprecated.Adds a newUsernameTokento a soap envelope. A completeUsernameTokenis constructed and added to thewsse:Securityheader.- Parameters:
doc- The SOAP enevlope as W3C documentusername- The username to set in the UsernameTokenpassword- The password of the user- Returns:
- Document with UsernameToken added
-
WSSecUsernameToken()