Java Reference
In-Depth Information
decodedAutho.length() - 1) {
return null;
}
String username =
decodedAutho.substring(0, colon);
String password =
decodedAutho.substring(colon + 1);
//Container password validation,
you can put your
//own validation process instead of
delegating it to the container
PasswordValidationCallback
pwdValidCallback =
new
PasswordValidationCallback(cSubject, username,
password.toCharArray());
handler.handle(new
Callback[]{pwdValidCallback});
//Removes the stored password
pwdValidCallback.clearPassword();
password = null;
if (pwdValidCallback.getResult())
{//if the user is authenticated
return username;
}
}
return null;
}
public AuthStatus
secureResponse(MessageInfo messageInfo, Subject
serviceSubject) throws AuthException {
return AuthStatus.SEND_SUCCESS;
}
Search WWH ::




Custom Search