This class implements the
Principal
interface and represents a UsernameToken user.
In addition to the principal's name this principal object also contains the nonce and created time of the UsernameToken (refer to the OASIS WS Security specification, UsernameToken profile). These values are set only if the password of UsernameToken was of type
PasswordDigest
.
Furthermore the password type is provided to the application. The password type is the string of the type attribute of the password element inside the username token. Refer to the OASIS WSS specification for predefined password types.
The
equals()
method use the prinicipal's name only and does not compare nonce or created time.
Modelled according to the example provided by JAAS documentation
@author Davanum Srinivas (dims@yahoo.com).
@author Werner Dittmann (Werner.Dittmann@siemens.com).
@see java.security.Principal
@see javax.security.auth.Subject