core/cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/resolver/impl/SelectiveAuthenticationProviderWebflowEventResolver.java
/**
     * Filter events by multifactor authentication providers.
     *
     * @param resolveEvents     the resolve events
     * @param authentication    the authentication
     * @param registeredService the registered service
     * @return the set of events
     */
Filter events by multifactor authentication providers.
@param resolveEvents     the resolve events
@param authentication    the authentication
@param registeredService the registered service
@return the set of events
Filter events by multifactor authentication providers . @param resolveEvents the resolve events @param authentication the authentication @param registeredService the registered service @return the set of events
protected Set<Event> filterEventsByMultifactorAuthenticationProvider(final Set<Event> resolveEvents,
                                                                         final Authentication authentication,
                                                                         final RegisteredService registeredService) {
        logger.debug("Locating multifactor providers to determine support for this authentication sequence");
        final Map<String, MultifactorAuthenticationProvider> providers =
                WebUtils.getAllMultifactorAuthenticationProviders(applicationContext);
        if (providers == null || providers.isEmpty()) {
            logger.debug("No providers are available to honor this request. Moving on...");
            return resolveEvents;
        }
        final Set<Event> finalEvents = resolveEvents
                .stream()
                .filter(e -> !providers.entrySet()
                        .stream()
                        .filter(p -> p.getValue().supports(e, authentication, registeredService))
                        .collect(Collectors.toSet())
                        .isEmpty())
                .collect(Collectors.toSet());
        logger.debug("Finalized set of resolved events are {}", finalEvents);
        return finalEvents;
    }
protected Set < Event > filterEventsByMultifactorAuthenticationProvider ( final Set < Event > resolveEvents , final Authentication authentication , final RegisteredService registeredService ) { logger . debug ( "Locating multifactor providers to determine support for this authentication sequence" ) ; final Map < String , MultifactorAuthenticationProvider > providers = WebUtils . getAllMultifactorAuthenticationProviders ( applicationContext ) ; if ( providers == null || providers . isEmpty ( ) ) { logger . debug ( "No providers are available to honor this request. Moving on..." ) ; return resolveEvents ; } final Set < Event > finalEvents = resolveEvents . stream ( ) . filter ( e -> ! providers . entrySet ( ) . stream ( ) . filter ( p -> p . getValue ( ) . supports ( e , authentication , registeredService ) ) . collect ( Collectors . toSet ( ) ) . isEmpty ( ) ) . collect ( Collectors . toSet ( ) ) ; logger . debug ( "Finalized set of resolved events are {}" , finalEvents ) ; return finalEvents ; }
Filter events by multifactor authentication providers.
Filter events by multifactor authentication providers .