diff options
Diffstat (limited to 'mu4web/user/local.py')
-rw-r--r-- | mu4web/user/local.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mu4web/user/local.py b/mu4web/user/local.py index 37e88cb..c7936d6 100644 --- a/mu4web/user/local.py +++ b/mu4web/user/local.py @@ -1,12 +1,21 @@ +""" +User authentication through local password store. + +Currently (hard codedly) loads the file password.json from the current +path. Take care. +""" + from .. import password from ..password import Passwords from typing import cast import os from . import User -passwords: Passwords = password.Passwords(cast(os.PathLike, 'passwords.json')) +passwords: Passwords = password.Passwords(cast(os.PathLike[str], 'passwords.json')) class LocalUser(User): - def validate(self, password: str) -> bool: + """Authenticate user through local password file.""" + + def validate(self, password: str) -> bool: # noqa: 201 return passwords.validate(self._username, password) |