log.log(Level.SEVERE, LogStringsMessages.WSS_1424_INVALID_USERNAME_TOKEN());
throw new XWSSecurityException("Password for the username has not been set");
}
}
//Setting iterations in UsernameToken;
AttributedString as = new AttributedString();
String iterate = Integer.toString(iterations);
as.setValue(iterate);
unToken.setIteration(as);
PasswordDerivedKey pdk = new PasswordDerivedKey();
byte[] salt = null;
if (unToken.getSalt() == null) {
// Setting the Salt in unToken first time;
salt = pdk.get16ByteSalt();
AttributedString atbs = new AttributedString();
atbs.setValue(Base64.encode(salt));
unToken.setSalt(atbs);
} else {
//Retrieving the salt already there in unToken;
String decodeString = unToken.getSalt().getValue();
String iter = unToken.getIteration().getValue();