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:
commit
a5dd4d8a7d
4 changed files with 5 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue