this.passwordDigestValue = Base64.encode(hash);
}
private void setValues(){
if(usernameValue != null){
AttributedString ut = objFac.createAttributedString();
ut.setValue(usernameValue);
setUsername(ut);
}
if (passwordValue != null && !MessageConstants._EMPTY.equals(passwordValue) ){
AttributedString pw = objFac.createAttributedString();
if (MessageConstants.PASSWORD_DIGEST_NS == passwordType) {
try {
createDigest();
} catch (com.sun.xml.wss.impl.SecurityTokenException ex) {
ex.printStackTrace();
}
pw.setValue(passwordDigestValue);
setPassword(pw);
} else{
pw.setValue(passwordValue);
setPassword(pw);
}
QName qname = new QName("Type");
pw.getOtherAttributes().put(qname, passwordType);
}
if(nonceValue != null){
AttributedString non = objFac.createAttributedString();
non.setValue(nonceValue);
setNonce(non);
if (nonceEncodingType != null) {
QName qname = new QName("EncodingType");
non.getOtherAttributes().put(qname, nonceEncodingType);
}
}
if(createdValue != null){
AttributedString cr = objFac.createAttributedString();
cr.setValue(createdValue);
setCreated(cr);
}
valuesSet = true;
}