code: protected Conditions buildConditions(final RequestAbstractType authnRequest,
                                           final Object assertion, final SamlRegisteredService service,
                                           final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
                                           final MessageContext messageContext) throws SamlException {
  
          val currentDateTime = ZonedDateTime.now(ZoneOffset.UTC);
          var skewAllowance = casProperties.getAuthn().getSamlIdp().getResponse().getSkewAllowance();
          if (skewAllowance <= 0) {
              skewAllowance = casProperties.getSamlCore().getSkewAllowance();
          }
  
          val audienceUrls = new ArrayList<String>();
          audienceUrls.add(adaptor.getEntityId());
          if (StringUtils.isNotBlank(service.getAssertionAudiences())) {
              val audiences = org.springframework.util.StringUtils.commaDelimitedListToSet(service.getAssertionAudiences());
              audienceUrls.addAll(audiences);
          }
          return newConditions(currentDateTime,
              currentDateTime.plusSeconds(skewAllowance),
              audienceUrls.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
      }
docs: Build conditions conditions.
  
  @param authnRequest   the authn request
  @param assertion      the assertion
  @param service        the service
  @param adaptor        the adaptor
  @param messageContext the message context
  @return the conditions
  @throws SamlException the saml exception