1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Disable overloading BaseAuth login method

This commit is contained in:
IM 2024-12-25 21:56:04 +03:00
parent a4266c9690
commit 7df2fb35a7
4 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ Take a look at the class ``BaseAuth`` if you want to implement your own.
"""
from typing import Sequence, Set, Tuple, Union
from typing import Sequence, Set, Tuple, Union, final
from radicale import config, types, utils
from radicale.log import logger
@ -50,7 +50,6 @@ def load(configuration: "config.Configuration") -> "BaseAuth":
return utils.load_plugin(INTERNAL_TYPES, "auth", "Auth", BaseAuth,
configuration)
class BaseAuth:
_ldap_groups: Set[str] = set([])
@ -102,6 +101,7 @@ class BaseAuth:
raise NotImplementedError
@final
def login(self, login: str, password: str) -> str:
if self._lc_username:
login = login.lower()

View file

@ -32,7 +32,7 @@ class Auth(auth.BaseAuth):
self.timeout = 5
self.request_id_gen = itertools.count(1)
def login(self, login, password):
def _login(self, login, password):
"""Validate credentials.
Check if the ``login``/``password`` pair is valid according to Dovecot.

View file

@ -202,7 +202,7 @@ class Auth(auth.BaseAuth):
pass
return ""
def login(self, login: str, password: str) -> str:
def _login(self, login: str, password: str) -> str:
"""Validate credentials.
In first step we make a connection to the ldap server with the ldap_reader_dn credential.
In next step the DN of the user to authenticate will be searched.

View file

@ -29,7 +29,7 @@ from radicale import auth
class Auth(auth.BaseAuth):
def login(self, login: str, password: str) -> str:
def _login(self, login: str, password: str) -> str:
if login == "tmp":
return login
return ""