micro_service_placeholder/microService/api/helper.py

14 lines
336 B
Python
Raw Normal View History

2024-11-30 05:34:13 +00:00
import os
from dotenv import load_dotenv
load_dotenv(override=True)
class Helper():
def __init__(self):
self.gateway_key = os.getenv("GATEWAY_KEY")
def checkValidUser(self, request):
if not self.gateway_key == request.headers.get('Gateway-Key'):
return False
else:
return True