diff options
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/auth/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/auth/htpasswd.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/auth/http.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/plugins/auth/__init__.py b/kvmd/plugins/auth/__init__.py index 3bc40372..18f7ed6b 100644 --- a/kvmd/plugins/auth/__init__.py +++ b/kvmd/plugins/auth/__init__.py @@ -28,7 +28,7 @@ from .. import get_plugin_class # ===== class BaseAuthService(BasePlugin): - async def login(self, user: str, passwd: str) -> bool: + async def authorize(self, user: str, passwd: str) -> bool: raise NotImplementedError # pragma: nocover async def cleanup(self) -> None: diff --git a/kvmd/plugins/auth/htpasswd.py b/kvmd/plugins/auth/htpasswd.py index 4c2c5e35..3e7e52d9 100644 --- a/kvmd/plugins/auth/htpasswd.py +++ b/kvmd/plugins/auth/htpasswd.py @@ -44,6 +44,6 @@ class Plugin(BaseAuthService): "file": Option("/etc/kvmd/htpasswd", type=valid_abs_path_exists, unpack_as="path"), } - async def login(self, user: str, passwd: str) -> bool: + async def authorize(self, user: str, passwd: str) -> bool: htpasswd = passlib.apache.HtpasswdFile(self.__path) return htpasswd.check_password(user, passwd) diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py index 18ecaae6..edd7ab96 100644 --- a/kvmd/plugins/auth/http.py +++ b/kvmd/plugins/auth/http.py @@ -69,7 +69,7 @@ class Plugin(BaseAuthService): "timeout": Option(5.0, type=valid_float_f01), } - async def login(self, user: str, passwd: str) -> bool: + async def authorize(self, user: str, passwd: str) -> bool: session = self.__ensure_session() try: async with session.request( |