* when the callback is not supported
*/
@Override
protected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException {
if (callback instanceof PasswordValidationCallback) {
PasswordValidationCallback passwordCallback = (PasswordValidationCallback) callback;
if (passwordCallback.getRequest() instanceof PasswordValidationCallback.DigestPasswordRequest) {
PasswordValidationCallback.DigestPasswordRequest request =
(PasswordValidationCallback.DigestPasswordRequest) passwordCallback.getRequest();
String username = request.getUsername();
UserDetails user = loadUserDetails(username);
if (user != null) {
SpringSecurityUtils.checkUserValidity(user);
request.setPassword(user.getPassword());
}
SpringSecurityDigestPasswordValidator validator = new SpringSecurityDigestPasswordValidator(user);
passwordCallback.setValidator(validator);
return;
}
}
else if (callback instanceof TimestampValidationCallback) {
TimestampValidationCallback timestampCallback = (TimestampValidationCallback) callback;