protected Set<Event> resolveSingleMultifactorProvider(final Optional<RequestContext> context,
                                                          final RegisteredService registeredService,
                                                          final Service service,
                                                          final Principal principal,
                                                          final Collection<MultifactorAuthenticationProvider> providers) {
        val properties = casProperties.getAuthn().getMfa().getTriggers().getPrincipal();
        val globalPrincipalAttributeValueRegex = properties.getGlobalPrincipalAttributeValueRegex();

        val provider = providers.iterator().next();
        LOGGER.trace("Found a single multifactor provider [{}] in the application context", provider);
        val attributeNames = commaDelimitedListToSet(properties.getGlobalPrincipalAttributeNameTriggers());
        return multifactorAuthenticationProviderResolver.resolveEventViaPrincipalAttribute(
            principal, attributeNames, registeredService, service, context, providers,
            new PatternedAttributeValuePredicate(globalPrincipalAttributeValueRegex, properties.isReverseMatch()));
    }
This is {@link PrincipalAttributeMultifactorAuthenticationTrigger}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/mfa/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java