protected Status determineResponseStatus(final SamlProfileBuilderContext context) {
        if (context.getAuthenticatedAssertion().isEmpty()) {
            if (context.getSamlRequest() instanceof final AuthnRequest authnRequest && authnRequest.isPassive()) {
                val message = """
                    SAML2 authentication request from %s indicated a passive authentication request, \
                    but CAS is unable to satisfy and support this requirement, likely because \
                    no existing single sign-on session is available yet to build the SAML2 response.
                    """.formatted(context.getAdaptor().getEntityId()).stripIndent().trim();
                return newStatus(StatusCode.NO_PASSIVE, message);
            }
            return newStatus(StatusCode.AUTHN_FAILED, null);
        }
        return newStatus(StatusCode.SUCCESS, null);
    }
This is {@link SamlProfileSaml2ResponseBuilder}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/response/SamlProfileSaml2ResponseBuilder.java