Refactor to composable KayaMixin architecture
Replace wrapper-based SessionMiddleware/OIDCApp with KayaMixin subclasses applied via KayaApp(mixins=[...]). Mixins hook into handle_request and handle_websocket via before/after hooks, so both ASGI and RSGI keep working. Mixin dependencies are applied automatically and deduplicated.
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
from kaya.core import HttpContext, KayaApp
|
||||
from kaya.session import InMemorySessionStore, SessionMiddleware
|
||||
from kaya.session import InMemorySessionStore, SessionMixin
|
||||
|
||||
app = SessionMiddleware(KayaApp(), InMemorySessionStore())
|
||||
app = KayaApp(mixins=[SessionMixin(InMemorySessionStore())])
|
||||
|
||||
|
||||
@app.GET('/')
|
||||
|
||||
Reference in New Issue
Block a user