diff --git a/subscriptions/views.py b/subscriptions/views.py index d3c7d7c..4adce86 100644 --- a/subscriptions/views.py +++ b/subscriptions/views.py @@ -31,7 +31,15 @@ def app_store_webhook(request): with open(KEY_FILE,'r') as key_file: key = ''.join(key_file.readlines()) - decodedPayload = jwt.decode(signedPayload, base64.b64decode(key), algorithms=['ES256']) + jwt_options = { + 'verify_signature': True, + 'verify_exp': True, + 'verify_nbf': False, + 'verify_iat': True, + 'verify_aud': False + } + + decodedPayload = jwt.decode(signedPayload, key, algorithms=['ES256'], options=jwt_options) #print('hell yeah!' + str(key)) #logger.debug('test getLogger' + str(key))