bumper/bumper/web/plugins/v1/global_auth.py
2022-08-25 11:08:04 +02:00

23 lines
542 B
Python

"""Global auth plugin module."""
from collections.abc import Iterable
from aiohttp import web
from aiohttp.web_routedef import AbstractRouteDef
from ... import auth_util
from .. import WebserverPlugin
class GlobalAuthPlugin(WebserverPlugin):
"""Global auth plugin."""
@property
def routes(self) -> Iterable[AbstractRouteDef]:
"""Plugin routes."""
return [
web.route(
"*",
"/global/auth/getAuthCode",
auth_util.get_authcode,
),
]