@Override
    public Principal resolvePrincipal(final Principal principal) {
        return multifactorAuthenticationPrincipalResolver
            .stream()
            .filter(resolver -> resolver.supports(principal))
            .findFirst()
            .map(r -> r.resolve(principal))
            .orElseThrow(() -> new IllegalStateException("Unable to resolve principal for multifactor authentication"));
    }
This is {@link DefaultMultifactorAuthenticationProviderResolver}.

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