本文整理了Java中org.opensaml.saml.saml2.core.Response.setInResponseTo
方法的一些代码示例,展示了Response.setInResponseTo
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.setInResponseTo
方法的具体详情如下:
包路径:org.opensaml.saml.saml2.core.Response
类名称:Response
方法名:setInResponseTo
暂无
代码示例来源: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.jasig.cas/cas-server-support-saml
/**
* 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
*/
public Response newResponse(final String id, final DateTime issueInstant,
final String recipient, final WebApplicationService service) {
final Response samlResponse = newSamlObject(Response.class);
samlResponse.setID(id);
samlResponse.setIssueInstant(issueInstant);
samlResponse.setVersion(SAMLVersion.VERSION_20);
if (service instanceof SamlService) {
final SamlService samlService = (SamlService) service;
final String requestId = samlService.getRequestID();
if (StringUtils.isNotBlank(requestId)) {
samlResponse.setInResponseTo(requestId);
}
}
return samlResponse;
}
代码示例来源:origin: spring-projects/spring-security-saml
result.setConsent(response.getConsent());
result.setID(ofNullable(response.getId()).orElse("a" + UUID.randomUUID().toString()));
result.setInResponseTo(response.getInResponseTo());
result.setVersion(SAMLVersion.VERSION_20);
result.setIssueInstant(response.getIssueInstant());
内容来源于网络,如有侵权,请联系作者删除!