public Conditions newConditions(final ZonedDateTime issuedAt, final String audienceUri, final long issueLength) {
        val conditions = SamlUtils.newSamlObject(Conditions.class);
        conditions.setNotBefore(issuedAt.toInstant());

        val notOnOrAfter = ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(issueLength);
        conditions.setNotOnOrAfter(notOnOrAfter.toInstant());

        val audienceRestriction = SamlUtils.newSamlObject(AudienceRestrictionCondition.class);
        val audience = SamlUtils.newSamlObject(Audience.class);
        audience.setURI(audienceUri);
        audienceRestriction.getAudiences().add(audience);
        conditions.getAudienceRestrictionConditions().add(audienceRestriction);
        return conditions;
    }
New conditions element.

@param issuedAt    the issued at
@param audienceUri the service id
@param issueLength the issue length
@return the conditions
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/Saml10ObjectBuilder.java