}
UsernamePasswordToken token = (UsernamePasswordToken) authToken;
String username = token.getUsername();
Password password = new Password(token.getPassword());
log.debug("Attempting login for user {}", username);
UserInformation userInformation = userInformationSource.authenticate(username, password);
if (userInformation == null) {
log.debug("Failed login for user {}", username);
} else {
Object principal = new AuthC4JPrincipal(userInformation);
authenticationInfo = buildAuthenticationInfo(token, principal);