Skip to content

Commit 385bb38

Browse files
author
solancer
committed
Set alogorithm to decode jwt
1 parent ae86a3a commit 385bb38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

paypayopa/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def encode_jwt(self, secret=str, scope="direct_debit",
100100

101101
def decode_jwt(self, secret, token):
102102
try:
103-
ca = jwt.decode(token, secret, verify=False)
103+
ca = jwt.decode(token, base64.b64decode(secret), algorithm='HS256')
104104
return ca.get('userAuthorizationId'), ca.get('referenceId')
105105
except Exception as e:
106106
print("JWT Signature verification failed: ", e)

0 commit comments

Comments
 (0)