protected static String getRequiredNameIdFormatIfAny(final SamlProfileBuilderContext context) {
        val requiredNameFormat = SamlIdPUtils.getNameIDPolicy(context.getSamlRequest()).map(NameIDPolicy::getFormat).orElse(null);
        LOGGER.debug("AuthN request indicates [{}] is the required NameID format", requiredNameFormat);
        return requiredNameFormat;
    }
This is {@link SamlProfileSamlNameIdBuilder}.

@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/nameid/SamlProfileSamlNameIdBuilder.java