如何将cookie值添加到unboundId scim 2客户端sdk?

时间:2016-10-18 11:55:56

标签: cookies scim2 unboundid

在调用UnboundId的SCIM 2客户端sdk时,无法找到设置自定义Cookie值的方法。

我想将here提供的示例更改为:

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

知道如何实现这一目标吗?

*如果cookie被设置在其他位置,请不要在意,只要它被设置在某个地方。

1 个答案:

答案 0 :(得分:0)

找到它:

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