/** * Record a failed authentication attempt against the configured counter, * optionally incrementing the account lockout counter. * * @param profileRequestContext current profile request context * @param inc true iff lockout counter should be incremented * * @since 3.3.0 */ protected void recordFailure(@Nonnull final ProfileRequestContext profileRequestContext, final boolean inc) { recordFailure(); if (inc && lockoutManager != null) { lockoutManager.increment(profileRequestContext); } }
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) { handleError(profileRequestContext, authenticationContext, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.INVALID_CREDENTIALS); recordFailure(); return false; handleError(profileRequestContext, authenticationContext, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.INVALID_CREDENTIALS); recordFailure(); return false; handleError(profileRequestContext, authenticationContext, AuthnEventIds.ACCOUNT_LOCKED, AuthnEventIds.ACCOUNT_LOCKED); recordFailure(); return false;