if (upContext == null) { log.info("{} No UsernamePasswordContext available within authentication context", getLogPrefix()); handleError(profileRequestContext, authenticationContext, "NoCredentials", AuthnEventIds.NO_CREDENTIALS); recordFailure(); return false; } else if (upContext.getUsername() == null) { log.info("{} No username available within UsernamePasswordContext", getLogPrefix()); handleError(profileRequestContext, authenticationContext, "NoCredentials", AuthnEventIds.NO_CREDENTIALS); recordFailure(); return false; } else if (upContext.getPassword() == null) { log.info("{} No password available within UsernamePasswordContext", getLogPrefix()); handleError(profileRequestContext, authenticationContext, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.INVALID_CREDENTIALS); recordFailure(); handleError(profileRequestContext, authenticationContext, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.INVALID_CREDENTIALS); recordFailure(); log.info("{} Account for '{}' is locked out, aborting authentication", getLogPrefix(), upContext.getUsername()); handleError(profileRequestContext, authenticationContext, AuthnEventIds.ACCOUNT_LOCKED, AuthnEventIds.ACCOUNT_LOCKED); recordFailure();