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

Merge pull request #1665 from itglob/master

Disable overloading BaseAuth login method
This commit is contained in:
Peter Bieringer 2024-12-26 16:19:15 +00:00 committed by GitHub
commit a5dd4d8a7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 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
@ -102,6 +102,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 ""