Search in sources :

Example 1 with ResponseImpl

use of com.sun.identity.saml2.protocol.impl.ResponseImpl in project OpenAM by OpenRock.

the class QueryClient method createResponse.

/**
     * Returns SAMLv2 <code>Response</code> object.
     * A new <code>Response</code> object is created from
     * the received response to include decrypted assertion
     * if the response  contained encrypted assertion.
     *
     * @param samlResponse the <code>Response</code> object.
     * @return <code>Response</code> object.
     * @exception <code>SAML2Exception</code> if there is an error creating
     *            the response.
     */
private static Response createResponse(Response samlResponse, List assertions) throws SAML2Exception {
    Response response = new ResponseImpl();
    response.setVersion(samlResponse.getVersion());
    response.setIssueInstant(samlResponse.getIssueInstant());
    response.setID(samlResponse.getID());
    response.setInResponseTo(samlResponse.getInResponseTo());
    response.setIssuer(samlResponse.getIssuer());
    response.setDestination(samlResponse.getDestination());
    response.setExtensions(samlResponse.getExtensions());
    response.setConsent(samlResponse.getConsent());
    response.setStatus(samlResponse.getStatus());
    response.setAssertion(assertions);
    return response;
}
Also used : Response(com.sun.identity.saml2.protocol.Response) ResponseImpl(com.sun.identity.saml2.protocol.impl.ResponseImpl)

Aggregations

Response (com.sun.identity.saml2.protocol.Response)1 ResponseImpl (com.sun.identity.saml2.protocol.impl.ResponseImpl)1