diff --git a/apps/notification/webapi/middleware/__init__.py b/apps/notification/webapi/middleware/__init__.py index 2eb59b0..5700ce5 100644 --- a/apps/notification/webapi/middleware/__init__.py +++ b/apps/notification/webapi/middleware/__init__.py @@ -1,3 +1,3 @@ -from .api_key_middleware import NotificationServiceMiddleware +from .freeleaps_auth_middleware import FreeleapsAuthMiddleware -__all__ = ['NotificationServiceMiddleware'] \ No newline at end of file +__all__ = ['FreeleapsAuthMiddleware'] \ No newline at end of file diff --git a/apps/notification/webapi/middleware/api_key_middleware.py b/apps/notification/webapi/middleware/freeleaps_auth_middleware.py similarity index 98% rename from apps/notification/webapi/middleware/api_key_middleware.py rename to apps/notification/webapi/middleware/freeleaps_auth_middleware.py index a88dee5..5c3c596 100644 --- a/apps/notification/webapi/middleware/api_key_middleware.py +++ b/apps/notification/webapi/middleware/freeleaps_auth_middleware.py @@ -24,7 +24,7 @@ class RequestContext: # Create context variable, store RequestContext object request_context_var = contextvars.ContextVar('request_context', default=RequestContext()) -class NotificationServiceMiddleware: +class FreeleapsAuthMiddleware: """ Notification service API Key middleware """ @@ -32,7 +32,7 @@ class NotificationServiceMiddleware: def __init__(self, app): self.app = app self.api_key_introspect_handler = ApiKeyIntrospectHandler() - self.module_logger = ModuleLogger(sender_id=NotificationServiceMiddleware) + self.module_logger = ModuleLogger(sender_id=FreeleapsAuthMiddleware) async def __call__(self, scope, receive, send): """ diff --git a/apps/notification/webapi/providers/middleware.py b/apps/notification/webapi/providers/middleware.py index 04ba64a..43df09b 100644 --- a/apps/notification/webapi/providers/middleware.py +++ b/apps/notification/webapi/providers/middleware.py @@ -1,4 +1,4 @@ -from webapi.middleware.api_key_middleware import NotificationServiceMiddleware +from webapi.middleware.freeleaps_auth_middleware import FreeleapsAuthMiddleware def register(app): @@ -6,4 +6,4 @@ def register(app): Register middleware to FastAPI application """ # Register API Key middleware - app.add_middleware(NotificationServiceMiddleware) \ No newline at end of file + app.add_middleware(FreeleapsAuthMiddleware) \ No newline at end of file