use of org.opensaml.saml.saml2.ecp.impl.ResponseBuilder in project ddf by codice.
the class SoapResponseCreator method createEcpResponse.
private String createEcpResponse(AuthnRequest authnRequest) throws WSSecurityException {
ResponseBuilder responseBuilder = new ResponseBuilder();
org.opensaml.saml.saml2.ecp.Response response = responseBuilder.buildObject();
response.setSOAP11Actor(HTTP_SCHEMAS_XMLSOAP_ORG_SOAP_ACTOR_NEXT);
response.setSOAP11MustUnderstand(true);
response.setAssertionConsumerServiceURL(getAssertionConsumerServiceURL(authnRequest));
return convertXmlObjectToString(response);
}
use of org.opensaml.saml.saml2.ecp.impl.ResponseBuilder in project ddf by codice.
the class LoginFilter method createSamlResponse.
/**
* Creates the SAML response that we use for validation against the CXF
* code.
*
* @param inResponseTo
* @param issuer
* @param status
* @return Response
*/
private 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;
}
Aggregations