/** * Adds an exception encountered during the action to an {@link AuthenticationErrorContext}, creating one if * necessary, beneath the {@link AuthenticationContext}. * * <p>The exception message is evaluated as a potential match as a "classified" error and if matched, * the classification label is attached to the {@link AuthenticationErrorContext} and used as the * resulting event for the action. * * @param profileRequestContext the current profile request context * @param authenticationContext the current authentication context * @param e the exception to process * @param eventId the event to "return" via an {@link org.opensaml.profile.context.EventContext} if * the exception message is not classified */ protected void handleError( @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext, @Nonnull final AuthenticationContext authenticationContext, @Nonnull final Exception e, @Nonnull @NotEmpty final String eventId) { final AuthenticationErrorContext errorCtx = authenticationContext.getSubcontext(AuthenticationErrorContext.class, true); errorCtx.addException(e); handleError(profileRequestContext, authenticationContext, e.getMessage(), eventId); }
if (Iterables.any(entry.getValue(), checker)) { authenticationContext.getSubcontext(AuthenticationErrorContext.class, true).getClassifiedErrors().add(entry.getKey()); if (!eventSet) { eventSet = true;