Skip to content

Commit

Permalink
Release v1.4.1 (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
urischwartz-cb authored May 24, 2024
1 parent 509ce1b commit ca1f934
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion coinbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.0"
__version__ = "1.4.1"
2 changes: 1 addition & 1 deletion coinbase/jwt_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_jwt_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit ca1f934

Please sign in to comment.