@Override
    public AuthnContext build(final SamlProfileBuilderContext context) throws Exception {
        val classRefValue = buildAuthnContextClassRefValue(context);
        val authnContext = newSamlObject(AuthnContext.class);
        if (StringUtils.isNotBlank(classRefValue)) {
            val classRef = newSamlObject(AuthnContextClassRef.class);
            classRef.setURI(classRefValue);
            authnContext.setAuthnContextClassRef(classRef);
        }
        buildDefaultAuthenticatingAuthority(context, authnContext);
        return authnContext;
    }
This is {@link SamlProfileAuthnContextClassRefBuilder}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/authn/SamlProfileAuthnContextClassRefBuilder.java