Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 337a91b

Browse files
committed
Updated default IAM token URL
1 parent a1ba614 commit 337a91b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 2.8.0 (Unreleased)
22

3+
- [FIXED] Updated default IBM Cloud Identity and Access Management token URL.
34
- [REMOVED] Removed broken source and target parameters that constantly threw `AttributeError` when creating a replication document.
45

56
# 2.7.0 (2017-10-31)

docs/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Cloud Platform.
100100
See `IBM Cloud Identity and Access Management <https://console.bluemix.net/docs/services/Cloudant/guides/iam.html#ibm-cloud-identity-and-access-management>`_
101101
for more information.
102102

103-
The production IAM token service at *https://iam.bluemix.net/oidc/token* is used
103+
The production IAM token service at *https://iam.bluemix.net/identity/token* is used
104104
by default. You can set an ``IAM_TOKEN_URL`` environment variable to override
105105
this.
106106

src/cloudant/_client_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def __init__(self, api_key, server_url, **kwargs):
193193

194194
self._api_key = api_key
195195
self._token_url = os.environ.get(
196-
'IAM_TOKEN_URL', 'https://iam.bluemix.net/oidc/token')
196+
'IAM_TOKEN_URL', 'https://iam.bluemix.net/identity/token')
197197

198198
def login(self):
199199
"""

tests/unit/iam_auth_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'2PTo4Exa17V-R_73Nq8VPCwpOvZcwKRA2sPTVgTMzU34max8b5kpTzVGJ'
4444
'6SXSItTVOUdAygZBng')
4545

46-
MOCK_OIDC_TOKEN_RESPONSE = {
46+
MOCK_IAM_TOKEN_RESPONSE = {
4747
'access_token': MOCK_ACCESS_TOKEN,
4848
'refresh_token': ('MO61FKNvVRWkSa4vmBZqYv_Jt1kkGMUc-XzTcNnR-GnIhVKXHUWxJVV3'
4949
'RddE8Kqh3X_TZRmyK8UySIWKxoJ2t6obUSUalPm90SBpTdoXtaljpNyo'
@@ -100,7 +100,7 @@ def test_iam_set_credentials(self):
100100
@mock.patch('cloudant._client_session.ClientSession.request')
101101
def test_iam_get_access_token(self, m_req):
102102
m_response = mock.MagicMock()
103-
m_response.json.return_value = MOCK_OIDC_TOKEN_RESPONSE
103+
m_response.json.return_value = MOCK_IAM_TOKEN_RESPONSE
104104
m_req.return_value = m_response
105105

106106
iam = IAMSession(MOCK_API_KEY, 'http://127.0.0.1:5984')

0 commit comments

Comments
 (0)