/** * Record a successful authentication attempt against the configured counter, * optionally clearing account lockout state. * * @param profileRequestContext current profile request context * * @since 3.3.0 */ protected void recordSuccess(@Nonnull final ProfileRequestContext profileRequestContext) { recordSuccess(); if (lockoutManager != null) { lockoutManager.clear(profileRequestContext); } }
/** * 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); } }
final boolean lockout = lockoutManager.check(profileRequestContext); response.setStatus(HttpServletResponse.SC_OK); final JsonFactory jsonFactory = new JsonFactory(); if (lockoutManager.increment(profileRequestContext)) { response.setStatus(HttpServletResponse.SC_NO_CONTENT); } else { if (lockoutManager.clear(profileRequestContext)) { response.setStatus(HttpServletResponse.SC_NO_CONTENT); } else {
if (lockoutManager != null && lockoutManager.check(profileRequestContext)) { log.info("{} Account for '{}' is locked out, aborting authentication", getLogPrefix(), upContext.getUsername());