feat(name): rename
This commit is contained in:
parent
6630d20c13
commit
6ecee2837e
@ -1,3 +1,3 @@
|
|||||||
from .api_key_middleware import NotificationServiceMiddleware
|
from .freeleaps_auth_middleware import FreeleapsAuthMiddleware
|
||||||
|
|
||||||
__all__ = ['NotificationServiceMiddleware']
|
__all__ = ['FreeleapsAuthMiddleware']
|
||||||
@ -24,7 +24,7 @@ class RequestContext:
|
|||||||
# Create context variable, store RequestContext object
|
# Create context variable, store RequestContext object
|
||||||
request_context_var = contextvars.ContextVar('request_context', default=RequestContext())
|
request_context_var = contextvars.ContextVar('request_context', default=RequestContext())
|
||||||
|
|
||||||
class NotificationServiceMiddleware:
|
class FreeleapsAuthMiddleware:
|
||||||
"""
|
"""
|
||||||
Notification service API Key middleware
|
Notification service API Key middleware
|
||||||
"""
|
"""
|
||||||
@ -32,7 +32,7 @@ class NotificationServiceMiddleware:
|
|||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
self.app = app
|
self.app = app
|
||||||
self.api_key_introspect_handler = ApiKeyIntrospectHandler()
|
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):
|
async def __call__(self, scope, receive, send):
|
||||||
"""
|
"""
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from webapi.middleware.api_key_middleware import NotificationServiceMiddleware
|
from webapi.middleware.freeleaps_auth_middleware import FreeleapsAuthMiddleware
|
||||||
|
|
||||||
|
|
||||||
def register(app):
|
def register(app):
|
||||||
@ -6,4 +6,4 @@ def register(app):
|
|||||||
Register middleware to FastAPI application
|
Register middleware to FastAPI application
|
||||||
"""
|
"""
|
||||||
# Register API Key middleware
|
# Register API Key middleware
|
||||||
app.add_middleware(NotificationServiceMiddleware)
|
app.add_middleware(FreeleapsAuthMiddleware)
|
||||||
Loading…
Reference in New Issue
Block a user