diff --git a/subscriptions/views.py b/subscriptions/views.py index 5304682..2fb4fb1 100644 --- a/subscriptions/views.py +++ b/subscriptions/views.py @@ -4,6 +4,7 @@ from django.views.decorators.csrf import csrf_exempt from .models import ASSNotification from django.conf import settings import json, jwt +import base64 import logging import logging.config @@ -30,10 +31,10 @@ def app_store_webhook(request): with open(KEY_FILE,'r') as key_file: key = ''.join(key_file.readlines()) - decodedPayload = jwt.decode(signedPayload, key, algorithms=['ES256']) + decodedPayload = jwt.decode(signedPayload, b64decode(key), algorithms=['ES256']) - print('hell yeah!' + str(key)) - logger.debug('test getLogger' + str(key)) + #print('hell yeah!' + str(key)) + #logger.debug('test getLogger' + str(key)) notification = ASSNotification( content=decodedPayload,