Search in sources :

Example 1 with IDPEntryBuilder

use of org.opensaml.saml.saml2.core.impl.IDPEntryBuilder in project ddf by codice.

the class IdpHandler method createEcpRequest.

private String createEcpRequest() throws WSSecurityException {
    org.opensaml.saml.saml2.ecp.impl.RequestBuilder requestBuilder = new org.opensaml.saml.saml2.ecp.impl.RequestBuilder();
    org.opensaml.saml.saml2.ecp.Request ecpRequest = requestBuilder.buildObject();
    ecpRequest.setSOAP11MustUnderstand(true);
    ecpRequest.setSOAP11Actor(HTTP_SCHEMAS_XMLSOAP_ORG_SOAP_ACTOR_NEXT);
    Issuer issuer = issuerBuilder.buildObject();
    issuer.setValue(getSpIssuerId());
    ecpRequest.setIssuer(issuer);
    IDPListBuilder idpListBuilder = new IDPListBuilder();
    IDPList idpList = idpListBuilder.buildObject();
    IDPEntryBuilder idpEntryBuilder = new IDPEntryBuilder();
    IDPEntry idpEntry = idpEntryBuilder.buildObject();
    idpEntry.setProviderID(idpMetadata.getEntityId());
    idpEntry.setName(idpMetadata.getSingleSignOnLocation());
    idpEntry.setLoc(idpMetadata.getSingleSignOnLocation());
    idpList.getIDPEntrys().add(idpEntry);
    ecpRequest.setIDPList(idpList);
    return convertXmlObjectToString(ecpRequest);
}
Also used : IDPEntryBuilder(org.opensaml.saml.saml2.core.impl.IDPEntryBuilder) RequestBuilder(ddf.security.liberty.paos.impl.RequestBuilder) Issuer(org.opensaml.saml.saml2.core.Issuer) IDPList(org.opensaml.saml.saml2.core.IDPList) IDPEntry(org.opensaml.saml.saml2.core.IDPEntry) IDPListBuilder(org.opensaml.saml.saml2.core.impl.IDPListBuilder)

Aggregations

RequestBuilder (ddf.security.liberty.paos.impl.RequestBuilder)1 IDPEntry (org.opensaml.saml.saml2.core.IDPEntry)1 IDPList (org.opensaml.saml.saml2.core.IDPList)1 Issuer (org.opensaml.saml.saml2.core.Issuer)1 IDPEntryBuilder (org.opensaml.saml.saml2.core.impl.IDPEntryBuilder)1 IDPListBuilder (org.opensaml.saml.saml2.core.impl.IDPListBuilder)1