|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.message.WSSecBase
org.apache.ws.security.message.WSSecUsernameToken
Builds a WS UsernameToken. Refer to the WS specification, UsernameToken profile
Field Summary |
Fields inherited from class org.apache.ws.security.message.WSSecBase |
doDebug, keyIdentifierType, parts, password, user, wssConfig |
Constructor Summary | |
WSSecUsernameToken()
Constructor. |
Method Summary | |
void |
addCreated()
Add a Created element to the UsernameToken. |
void |
addNonce()
Add a Nonce element to the UsernameToken. |
org.w3c.dom.Document |
build(org.w3c.dom.Document doc,
WSSecHeader secHeader)
Adds a new UsernameToken to a soap envelope. |
java.lang.String |
getId()
Get the id generated during prepare() . |
byte[] |
getSecretKey()
Get the derived secret key. |
void |
prepare(org.w3c.dom.Document doc)
Creates a Username token. |
void |
prependToHeader(WSSecHeader secHeader)
Prepends the UsernameToken element to the elements already in the Security header. |
void |
setPasswordType(java.lang.String pwType)
Defines how to construct the password element of the UsernameToken . |
Methods inherited from class org.apache.ws.security.message.WSSecBase |
getKeyIdentifierType, setBodyID, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WSSecUsernameToken()
Method Detail |
public void setPasswordType(java.lang.String pwType)
UsernameToken
.
pwType
- contains the password type. Only allowed values are
WSConstants.PASSWORD_DIGEST
and
WSConstants.PASSWORD_TEXT
.public void addNonce()
public void addCreated()
public byte[] getSecretKey()
prepare()
method was called use this method
to compute a derived secret key. The generation of this secret key is according
to WS-Trust specification.
prepare()
was not called before.public java.lang.String getId()
prepare()
.
Returns the the value of wsu:Id attribute of this UsernameToken.
prepare()
was not called before.public void prepare(org.w3c.dom.Document doc)
prepare()
all parameters such as user, password,
passwordType etc. must be set. A complete UsernameToken
is
constructed.
doc
- The SOAP enevlope as W3C documentpublic void prependToHeader(WSSecHeader secHeader)
prepare()
.
This allows to insert the UsernameToken element at any position in the
Security header.
secHeader
- The security header that holds the Signature element.public org.w3c.dom.Document build(org.w3c.dom.Document doc, WSSecHeader secHeader)
UsernameToken
to a soap envelope.
Before calling build()
all parameters such as user,
password, passwordType etc. must be set. A complete
UsernameToken
is constructed and added to the
wsse:Security
header.
doc
- The SOAP enevlope as W3C documentsecHeader
- The security header inside the SOAP envelope
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |