AlikElzin-kilaka
AlikElzin-kilaka

Reputation: 36041

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

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.

Upvotes: 0

Views: 86

Answers (1)

AlikElzin-kilaka
AlikElzin-kilaka

Reputation: 36041

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);

Upvotes: 0

Related Questions