0

调用 UnboundId 的 SCIM 2 客户端 sdk 时找不到设置自定义 cookie 值的方法。

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

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

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

* 不关心 cookie 是否设置在其他地方,只要它设置在某处即可。

4

1 回答 1

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);
于 2016-10-19T10:46:43.777 回答