@Override
    public Event handle(final AuthenticationException exception, final RequestContext requestContext) {
        return FunctionUtils.doUnchecked(() -> {
            val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
            val service = context.getArgumentExtractor().extractService(request);
            val redirectUri = CollectionUtils.firstElement(service.getAttributes().get(OAuth20Constants.REDIRECT_URI)).orElseThrow().toString();
            val registeredService = OAuth20Utils.getRegisteredOAuthServiceByRedirectUri(context.getServicesManager(), redirectUri);
            RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(service, registeredService);
            val url = new URIBuilder(redirectUri).addParameter(OAuth20Constants.ERROR, OAuth20Constants.UNMET_AUTHENTICATION_REQUIREMENTS).build();
            requestContext.getRequestScope().put("url", url);
            LOGGER.debug("Redirecting to [{}]", url);
            return EVENT_FACTORY.event(this, CasWebflowConstants.TRANSITION_ID_REDIRECT);
        });
    }
This is {@link OidcUnmetAuthenticationRequirementWebflowExceptionHandler}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/flow/OidcUnmetAuthenticationRequirementWebflowExceptionHandler.java