org.opensaml.saml.saml2.core.Response.setIssuer()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(197)

本文整理了Java中org.opensaml.saml.saml2.core.Response.setIssuer方法的一些代码示例,展示了Response.setIssuer的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.setIssuer方法的具体详情如下:
包路径:org.opensaml.saml.saml2.core.Response
类名称:Response
方法名:setIssuer

Response.setIssuer介绍

暂无

代码示例

代码示例来源:origin: line/armeria

response.setIssuer(issuer);
response.setIssueInstant(DateTime.now());

代码示例来源:origin: codice/ddf

public static Response createResponse(
  Issuer issuer, Status status, String requestId, Element samlAssertion)
  throws WSSecurityException {
 Response response = responseSAMLObjectBuilder.buildObject();
 response.setIssuer(issuer);
 response.setStatus(status);
 response.setID("_" + UUID.randomUUID().toString());
 response.setIssueInstant(new DateTime());
 response.setInResponseTo(requestId);
 response.setVersion(SAMLVersion.VERSION_20);
 if (samlAssertion != null) {
  SamlAssertionWrapper samlAssertionWrapper = new SamlAssertionWrapper(samlAssertion);
  response.getAssertions().add(samlAssertionWrapper.getSaml2());
 }
 return response;
}

代码示例来源:origin: org.apache.cxf.fediz/fediz-idp-core

@SuppressWarnings("unchecked")
public static Response createSAMLResponse(
  String inResponseTo,
  String issuer,
  Status status
) {
  if (responseBuilder == null) {
    responseBuilder = (SAMLObjectBuilder<Response>)
      builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME);
  }
  Response response = responseBuilder.buildObject();
  response.setID(UUID.randomUUID().toString());
  response.setIssueInstant(new DateTime());
  response.setInResponseTo(inResponseTo);
  response.setIssuer(createIssuer(issuer));
  response.setStatus(status);
  response.setVersion(SAMLVersion.VERSION_20);
  return response;
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.saml2/org.wso2.carbon.identity.query.saml

/**
 * This method is used to build error response when request contain validation or
 * processing errors
 *
 * @param invalidItem List of invalid items (violations)
 * @return Response element which contain error status and error message
 * @throws IdentitySAML2QueryException If unable to collect issuer
 */
public static Response build(List<InvalidItemDTO> invalidItem) throws IdentitySAML2QueryException {
  Response response = new ResponseBuilder().buildObject();
  response.setIssuer(OpenSAML3Util.getIssuer(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME));
  response.setID(SAMLSSOUtil.createID());
  String statusCode = "";
  String statusMessage = "";
  //selecting Status Code
  if (invalidItem.size() > 0) {
    statusMessage = invalidItem.get(0).getMessage();
    statusCode = invalidItem.get(0).getValidationType();
    statusCode = filterStatusCode(statusCode);
  }
  response.setStatus(buildStatus(statusCode, statusMessage));
  response.setVersion(SAMLVersion.VERSION_20);
  DateTime issueInstant = new DateTime();
  response.setIssueInstant(issueInstant);
  return response;
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.saml2/org.wso2.carbon.identity.query.saml

response.setIssuer(OpenSAML3Util.getIssuer(tenantDomain));
response.setID(SAMLSSOUtil.createID());
response.setStatus(buildStatus(SAMLSSOConstants.StatusCodes.SUCCESS_CODE, null));

代码示例来源:origin: org.apereo.cas/cas-server-support-saml-idp-web

val samlResponse = newResponse(id, ZonedDateTime.now(ZoneOffset.UTC), authnRequest.getID(), null);
samlResponse.setVersion(SAMLVersion.VERSION_20);
samlResponse.setIssuer(buildEntityIssuer());

代码示例来源:origin: spring-projects/spring-security-saml

result.setIssueInstant(response.getIssueInstant());
result.setDestination(response.getDestination());
result.setIssuer(toIssuer(response.getIssuer()));

相关文章