Skip to content

Commit 3b5ddad

Browse files
committed
Remove .decode("utf-8") on Guest Issuer jwt_token
1 parent 9aef6b4 commit 3b5ddad

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/webexpythonsdk/api/guest_issuer.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ def create(self, sub, name, iss, exp, secret):
106106
key = base64.b64decode(secret)
107107
jwt_token = jwt.encode(payload, key, algorithm="HS256")
108108

109-
# TODO: Remove `.decode("utf-8")` when Python 2 is no longer supported
110-
# v1.7.1 is the last release of PyJWT that supports Python 2, and it
111-
# returns a byte string for the JWT token.
112-
headers = {"Authorization": "Bearer " + jwt_token.decode("utf-8")}
109+
headers = {"Authorization": "Bearer " + jwt_token}
113110

114111
json_data = self._session.post(
115112
API_ENDPOINT + "/" + "login", headers=headers

0 commit comments

Comments
 (0)