@Override
    public boolean isMultifactorAuthenticationBypassed(final Authentication authentication, final String requestedContext) {
        val attributes = authentication.getAttributes();
        if (attributes.containsKey(AUTHENTICATION_ATTRIBUTE_BYPASS_MFA)) {

            val result = CollectionUtils.firstElement(attributes.get(AUTHENTICATION_ATTRIBUTE_BYPASS_MFA));
            val providerRes = CollectionUtils.firstElement(attributes.get(AUTHENTICATION_ATTRIBUTE_BYPASS_MFA_PROVIDER));

            if (result.isPresent()) {
                val bypass = (Boolean) result.get();
                if (bypass && providerRes.isPresent()) {
                    val provider = providerRes.get().toString();
                    return StringUtils.equalsIgnoreCase(requestedContext, provider);
                }
            }
        }
        return false;
    }
This is {@link BaseMultifactorAuthenticationProviderBypassEvaluator}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/bypass/BaseMultifactorAuthenticationProviderBypassEvaluator.java