add JWT_SECRET_KEY env

This commit is contained in:
karthikmurakonda 2023-10-19 06:51:47 +05:30
parent 158851f6e4
commit 1038dcf5b8
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ def isAuthorizedService():
headers = request.META headers = request.META
if 'HTTP_AUTHORIZATION' in headers: if 'HTTP_AUTHORIZATION' in headers:
token_id = headers['HTTP_AUTHORIZATION'][7:] token_id = headers['HTTP_AUTHORIZATION'][7:]
jwt.decode(token_id, os.environ.get("SERVICE_SECRET_KEY"), algorithms="HS256") jwt.decode(token_id, os.environ.get("JWT_SECRET_KEY"), algorithms="HS256")
return view_func(request, *args, **kwargs) return view_func(request, *args, **kwargs)
else: else:
raise PermissionError("Authorization Header Not Found") raise PermissionError("Authorization Header Not Found")