code: public Response newResponse(final String id, final ZonedDateTime issueInstant,
                                  final String recipient, final WebApplicationService service) {
  
          val samlResponse = newSamlObject(Response.class);
          samlResponse.setID(id);
          samlResponse.setIssueInstant(DateTimeUtils.dateTimeOf(issueInstant));
          samlResponse.setVersion(SAMLVersion.VERSION_20);
          if (StringUtils.isNotBlank(recipient)) {
              LOGGER.debug("Setting provided RequestId [{}] as InResponseTo", recipient);
              samlResponse.setInResponseTo(recipient);
          } else {
              LOGGER.debug("No recipient is provided. Skipping InResponseTo");
          }
          return samlResponse;
      }
docs: Create a new SAML response object.
  
  @param id           the id
  @param issueInstant the issue instant
  @param recipient    the recipient
  @param service      the service
  @return the response