Support session/cookie based auth, see #1108

This commit is contained in:
Agate 2020-05-18 12:03:30 +02:00
parent a9ba323b13
commit 550dbe46cc
14 changed files with 172 additions and 62 deletions

View file

@ -29,6 +29,9 @@ class TokenAuthMiddleware:
self.inner = inner
def __call__(self, scope):
if "user" in scope:
# auth already handled
return self.inner(scope)
# XXX: 1.0 remove this, replace with websocket/scopedtoken
auth = TokenHeaderAuth()
try: