From ca1f934bdf002f527d81b927a394c1582e526153 Mon Sep 17 00:00:00 2001 From: urischwartz-cb <143205923+urischwartz-cb@users.noreply.github.com> Date: Fri, 24 May 2024 11:45:52 -0400 Subject: [PATCH] Release v1.4.1 (#55) --- CHANGELOG.md | 5 +++++ coinbase/__version__.py | 2 +- coinbase/jwt_generator.py | 2 +- tests/test_jwt_generator.py | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 272f36b..c8ccc3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [1.4.1] - 2024-MAY-24 + +### Changed +- `iss` on the signed JWT changed from `coinbase-cloud` to `cdp` + ## [1.4.0] - 2024-MAY-21 ### Added diff --git a/coinbase/__version__.py b/coinbase/__version__.py index 3e8d9f9..bf25615 100644 --- a/coinbase/__version__.py +++ b/coinbase/__version__.py @@ -1 +1 @@ -__version__ = "1.4.0" +__version__ = "1.4.1" diff --git a/coinbase/jwt_generator.py b/coinbase/jwt_generator.py index a942c65..b31f2a4 100644 --- a/coinbase/jwt_generator.py +++ b/coinbase/jwt_generator.py @@ -25,7 +25,7 @@ def build_jwt(key_var, secret_var, uri=None) -> str: jwt_data = { "sub": key_var, - "iss": "coinbase-cloud", + "iss": "cdp", "nbf": int(time.time()), "exp": int(time.time()) + 120, } diff --git a/tests/test_jwt_generator.py b/tests/test_jwt_generator.py index a235e95..6565ae9 100644 --- a/tests/test_jwt_generator.py +++ b/tests/test_jwt_generator.py @@ -20,7 +20,7 @@ def test_build_rest_jwt(self): decoded_header = json.loads(header_bytes.decode("utf-8")) self.assertEqual(decoded_data["sub"], TEST_API_KEY) - self.assertEqual(decoded_data["iss"], "coinbase-cloud") + self.assertEqual(decoded_data["iss"], "cdp") self.assertEqual(decoded_data["uri"], uri) self.assertEqual(decoded_header["kid"], TEST_API_KEY) @@ -32,7 +32,7 @@ def test_build_ws_jwt(self): decoded_header = json.loads(header_bytes.decode("utf-8")) self.assertEqual(decoded_data["sub"], TEST_API_KEY) - self.assertEqual(decoded_data["iss"], "coinbase-cloud") + self.assertEqual(decoded_data["iss"], "cdp") self.assertNotIn("uri", decoded_data) self.assertEqual(decoded_header["kid"], TEST_API_KEY)