@Override public int hashCode() { int result = 17; String username = getName(); if (username != null) { result = 31 * result + username.hashCode();
@Override public int hashCode() { int result = 17; String username = getName(); if (username != null) { result = 31 * result + username.hashCode();
@Override protected void verifyPlaintextPassword(UsernameToken usernameToken, RequestData data) throws WSSecurityException { String user = usernameToken.getName(); String password = usernameToken.getPassword(); String pwType = usernameToken.getPasswordType(); // Provide the password to the user for validation WSPasswordCallback pwCb = new WSPasswordCallback(user, password, pwType, WSPasswordCallback.USERNAME_TOKEN, data); try { data.getCallbackHandler().handle(new Callback[] { pwCb }); } catch (IOException e) { if (mlog.isDebugEnabled()) { mlog.debug(e); } throw new WSSecurityException( WSSecurityException.FAILED_AUTHENTICATION); } catch (UnsupportedCallbackException e) { if (mlog.isDebugEnabled()) { mlog.debug(e); } throw new WSSecurityException( WSSecurityException.FAILED_AUTHENTICATION); } } }
WSPasswordCallback pwCb = new WSPasswordCallback( getName(), getPassword(), getPasswordType(), WSPasswordCallback.USERNAME_TOKEN, data );
WSPasswordCallback pwCb = new WSPasswordCallback( getName(), getPassword(), getPasswordType(), WSPasswordCallback.USERNAME_TOKEN, data );
final WSPasswordCallback pwCb = new WSPasswordCallback(usernameToken.getName(), null, usernameToken.getPasswordType(), WSPasswordCallback.USERNAME_TOKEN, data); try { final String user = usernameToken.getName(); final String password = pwCb.getPassword(); final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
log.debug("UsernameToken user " + usernameToken.getName()); log.debug("UsernameToken password type " + pwType);
log.debug("UsernameToken user " + usernameToken.getName()); log.debug("UsernameToken password type " + pwType);
String user = usernameToken.getName(); String password = usernameToken.getPassword(); String nonce = usernameToken.getNonce();
/** * Create a WSUsernameTokenPrincipal from this UsernameToken object */ public Principal createPrincipal() { WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(getName(), isHashed()); principal.setNonce(getNonce()); principal.setPassword(getPassword()); principal.setCreatedTime(getCreated()); return principal; }
/** * Create a WSUsernameTokenPrincipal from this UsernameToken object */ public Principal createPrincipal() { WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(getName(), isHashed()); principal.setNonce(getNonce()); principal.setPassword(getPassword()); principal.setCreatedTime(getCreated()); return principal; }
String user = usernameToken.getName(); String password = usernameToken.getPassword(); String nonce = usernameToken.getNonce();
new MuleCredentials(credential.getUsernametoken().getName(), credential.getUsernametoken().getPassword().toCharArray()));
} else { WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(token.getName(), token.isHashed()); principal.setNonce(token.getNonce()); principal.setPassword(token.getPassword());
} else { WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(token.getName(), token.isHashed()); principal.setNonce(token.getNonce()); principal.setPassword(token.getPassword());