*/
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
if( authentication == BAD_CREDENTIALS ) {
throw new BadCredentialsException( "Bad credentials" );
} else if( authentication == LOCKED ) {
throw new LockedException( "Account is locked" );
}
return authentication;
}