/** * Check for the presence of account state errors. * * @return true if account state errors exist */ public boolean hasAccountStateError() { final AccountState state = authenticationResponse.getAccountState(); return state != null ? state.getError() != null : false; }
@Override public List<MessageDescriptor> handle(final AuthenticationResponse response, final LdapPasswordPolicyConfiguration configuration) throws LoginException { final AccountState state = response.getAccountState(); if (state == null) { logger.debug("Account state not defined. Returning empty list of messages."); return Collections.emptyList(); } final List<MessageDescriptor> messages = new ArrayList<>(); handleError(state.getError(), response, configuration, messages); handleWarning(state.getWarning(), response, configuration, messages); return messages; }
.setAuthenticationResponse(response); if (response.getAccountState() != null) { final AccountState.Error error = response.getAccountState().getError(); handleWarning( profileRequestContext, final AccountState state = response.getAccountState(); handleError(profileRequestContext, authenticationContext, String.format("%s:%s:%s", state.getError(), response.getResultCode(), response.getMessage()), AuthnEventIds.ACCOUNT_ERROR); recordFailure(profileRequestContext, true);