|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.security.message.token.UsernameToken
UsernameToken according to WS Security specifications, UsernameToken profile.
| Field Summary | |
protected org.w3c.dom.Element |
element
|
protected org.w3c.dom.Element |
elementCreated
|
protected org.w3c.dom.Element |
elementNonce
|
protected org.w3c.dom.Element |
elementPassword
|
protected org.w3c.dom.Element |
elementUsername
|
protected boolean |
hashed
|
static java.lang.String |
PASSWORD_TYPE
|
protected java.lang.String |
passwordType
|
javax.xml.namespace.QName |
token
|
static java.lang.String |
TOKEN
|
protected WSSConfig |
wssConfig
|
| Constructor Summary | |
UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Document doc)
Constructs a UsernameToken object according
to the defined parameters. |
|
UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Document doc,
java.lang.String pwType)
Constructs a UsernameToken object according
to the defined parameters. |
|
UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Element elem)
Constructs a UsernameToken object and parses the
wsse:UsernameToken element to initialize it. |
|
| Method Summary | |
void |
addCreated(org.w3c.dom.Document doc)
Creates and adds a Created element to this UsernameToken |
void |
addNonce(org.w3c.dom.Document doc)
Creates and adds a Nonce element to this UsernameToken |
static java.lang.String |
doPasswordDigest(java.lang.String nonce,
java.lang.String created,
java.lang.String password)
|
java.lang.String |
getCreated()
Get the created timestamp. |
org.w3c.dom.Element |
getElement()
Returns the dom element of this UsernameToken object. |
java.lang.String |
getID()
Gets the id. |
java.lang.String |
getName()
Get the user name. |
java.lang.String |
getNonce()
Get the nonce. |
java.lang.String |
getPassword()
Gets the password string. |
java.lang.String |
getPasswordType()
|
byte[] |
getSecretKey()
Gets the secret key as per WS-Trust spec. |
byte[] |
getSecretKey(int keylen,
java.lang.String labelString)
Gets the secret key as per WS-Trust spec. |
boolean |
isHashed()
Get the hashed inidicator. |
void |
setID(java.lang.String id)
Set the id of this username token. |
void |
setName(java.lang.String name)
Set the user name. |
void |
setPassword(java.lang.String pwd)
Sets the password string. |
java.lang.String |
toString()
Returns the string representation of the token. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public javax.xml.namespace.QName token
public static final java.lang.String PASSWORD_TYPE
protected org.w3c.dom.Element element
protected org.w3c.dom.Element elementUsername
protected org.w3c.dom.Element elementPassword
protected org.w3c.dom.Element elementNonce
protected org.w3c.dom.Element elementCreated
protected java.lang.String passwordType
protected boolean hashed
protected WSSConfig wssConfig
public static java.lang.String TOKEN
| Constructor Detail |
public UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Element elem)
throws WSSecurityException
UsernameToken object and parses the
wsse:UsernameToken element to initialize it.
wssConfig - Configuration options for processing and building the wsse:Security headerelem - the wsse:UsernameToken element that
contains the UsernameToken data
WSSecurityException
public UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Document doc)
UsernameToken object according
to the defined parameters.
This constructes set the password encoding to
WSConstants.PASSWORD_DIGEST
wssConfig - Configuration options for processing and building the wsse:Security headerdoc - the SOAP envelope as Document
public UsernameToken(WSSConfig wssConfig,
org.w3c.dom.Document doc,
java.lang.String pwType)
UsernameToken object according
to the defined parameters.
wssConfig - Configuration options for processing and building the wsse:Security headerdoc - the SOAP envelope as Document| Method Detail |
public void addNonce(org.w3c.dom.Document doc)
public void addCreated(org.w3c.dom.Document doc)
public java.lang.String getName()
public void setName(java.lang.String name)
name - sets a text node containing the use name into the user name
element.public java.lang.String getNonce()
public java.lang.String getCreated()
public java.lang.String getPassword()
null if no such node
exists.public boolean isHashed()
true> the password of the
UsernameToken was encoded using
WSConstants.PASSWORD_DIGEST
- Returns:
- the hashed indicator.
public java.lang.String getPasswordType()
public void setPassword(java.lang.String pwd)
UsernameToken
either as plain text or encodes the password according to the
WS Security specifications, UsernameToken profile, into a password
digest.
pwd - the password to use
public static java.lang.String doPasswordDigest(java.lang.String nonce,
java.lang.String created,
java.lang.String password)
public org.w3c.dom.Element getElement()
UsernameToken object.
wsse:UsernameToken elementpublic java.lang.String toString()
public java.lang.String getID()
wsu:Id attribute of this
username tokenpublic void setID(java.lang.String id)
id - the value for the wsu:Id attribute of this
username tokenpublic byte[] getSecretKey()
public byte[] getSecretKey(int keylen,
java.lang.String labelString)
keylen - How many bytes to generate for the keylabelString - the label used to generate the seed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||