Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 46d8bed

Browse files
authored
Merge pull request #360 from cloudant/update-default-iam-token-server
Update the default IAM token server URL
2 parents d03ce46 + bf22c9b commit 46d8bed

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
version.
99
- [UPGRADED] Apache CouchDB Nano to a minimum of version 8 for `*AsStream`
1010
function fixes.
11+
- [FIXED] Updated the default IAM token server URL.
1112

1213
# 3.0.2 (2019-01-07)
1314
- [FIXED] Remove unnecessary `@types/nano` dependancy.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ var cloudant = new Cloudant({ url: myurl, maxAttempt: 5, plugins: [ 'iamauth', {
391391
This plugin will automatically exchange your IAM API key for a token. It will
392392
handle the authentication and ensure that the token is refreshed as required.
393393
394-
The production IAM token service at https://iam.bluemix.net/identity/token is
394+
The production IAM token service at https://iam.cloud.ibm.com/identity/token is
395395
used by default. You can set `iamTokenUrl` in your plugin configuration to
396396
override this. To authenticate with the IAM token service set `iamClientId`
397397
and `iamClientSecret` in your plugin configuration.

plugins/iamauth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class IAMPlugin extends BasePlugin {
3131
self.iamApiKey = null;
3232
self.baseUrl = cfg.baseUrl || null;
3333
self.cookieJar = request.jar();
34-
self.tokenUrl = cfg.iamTokenUrl || 'https://iam.bluemix.net/identity/token';
34+
self.tokenUrl = cfg.iamTokenUrl || 'https://iam.cloud.ibm.com/identity/token';
3535

3636
// Specifies whether IAM authentication should be applied to the request being intercepted.
3737
self.shouldApplyIAMAuth = true;

test/plugins/iamauth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const IAM_API_KEY = process.env.cloudant_iam_api_key || 'CqbrIYzdO3btWV-5t4teJLY
2727
const SERVER = process.env.SERVER_URL || `https://${ME}.cloudant.com`;
2828
const SERVER_NO_PROTOCOL = SERVER.replace(/^https?:\/\//, '');
2929
const SERVER_WITH_CREDS = `https://${ME}:${PASSWORD}@${SERVER_NO_PROTOCOL}`;
30-
const TOKEN_SERVER = 'https://iam.bluemix.net';
30+
const TOKEN_SERVER = 'https://iam.cloud.ibm.com';
3131
const DBNAME = `/nodejs-cloudant-${uuidv4()}`;
3232

3333
// mocks

0 commit comments

Comments
 (0)