How to add a cookie value to unboundId scim 2 client sdk?

83 Views Asked by At

Can't find a way to set a custom cookie value when invoking UnboundId's SCIM 2 client sdk.

I would like to change the example provided here to something like:

Client client = ClientBuilder.newClient().setCookie(<key>, <value>);
WebTarget target = client.target("https://example.com/scim/v2");
ScimService scimService = new ScimService(target);
...

Any idea how to achieve this?

* Don't care if the cookie is set elsewhere as long as it is being set somewhere.

1

There are 1 best solutions below

0
On

Found it:

Client client = ClientBuilder.newClient();
WebTarget target = client.target("https://example.com/scim/v2");
ScimService scimService = new ScimService(target);
RetrieveRequestBuilder.Typed retrieveRequestBuilder = scimService.retrieveRequest("Users", uuid);
retrieveRequestBuilder.header("Cookie", cookie);
UserResource userResource = retrieveRequestBuilder.invoke(UserResource.class);