if (userName == null || "".equals(userName)) {
userName = context.getSecurityEnvironment().getUsername(context.getExtraneousProperties());
}
if (userName == null || "".equals(userName)) {
log.log(Level.SEVERE, LogStringsMessages.WSS_1409_INVALID_USERNAME_TOKEN());
throw new XWSSecurityException("Username has not been set");
}
unToken.setUsernameValue(userName);
String password = untBinding.getPassword();
if (!untBinding.hasNoPassword() && (password == null || "".equals(password))) {
password = context.getSecurityEnvironment().getPassword(context.getExtraneousProperties());
}
if (!untBinding.hasNoPassword()) {
if (password == null) {
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);