This commit is contained in:
yumoqing 2023-06-12 14:54:49 +08:00
parent 49e8462029
commit fbdab31bc2

View File

@ -48,8 +48,9 @@ class AuthAPI(AppLogger):
# setup aiohttp_auth.auth middleware in aiohttp fashion
# print('policy = ', policy)
auth.setup(app, policy)
print('add auth middleware ....................')
app.middlewares.append(self.checkAuth)
app.router.add_route('GET', '/logout', self.logout)
# app.router.add_route('GET', '/logout', self.logout)
async def logout(self,request):
await auth.forget(request)