Skip to content

Commit b667b16

Browse files
committed
docs(README): Add snippet about ICP auth
1 parent 7efb5b8 commit b667b16

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Java client library to use the [Watson APIs][wdc].
2020
* [Authentication](#authentication)
2121
* [IAM](#iam)
2222
* [Username and password](#username-and-password)
23+
* [ICP](#icp)
2324
* [Cloud Pak for Data](#cloud-pak-for-data)
2425
* [Using the SDK](#using-the-sdk)
2526
* [Parsing responses](#parsing-responses)
@@ -197,6 +198,20 @@ Authenticator authenticator = new BasicAuthenticator("<username>", "<password>")
197198
Discovery service = new Discovery("2017-11-07", authenticator);
198199
```
199200

201+
#### ICP
202+
Authenticating with ICP is similar to the basic username and password method, except that you need to make sure to disable SSL verification to authenticate properly. See [here](#configuring-the-http-client) for more information.
203+
204+
```java
205+
Authenticator authenticator = new BasicAuthenticator("<username>", "<password>");
206+
Discovery service = new Discovery("2017-11-07", authenticator);
207+
208+
HttpConfigOptions options = new HttpConfigOptions.Builder()
209+
.disableSslVerification(true)
210+
.build();
211+
212+
service.configureClient(options);
213+
```
214+
200215
#### Cloud Pak for Data
201216
Like IAM, you can pass in credentials to let the SDK manage an access token for you or directly supply an access token to do it yourself.
202217

0 commit comments

Comments
 (0)