Skip to content

Commit 5f7adb1

Browse files
committed
Add defaults to LDAPAuthenticator
1 parent 7f612e6 commit 5f7adb1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tiled/authenticators.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,18 @@ class LDAPAuthenticator(InternalAuthenticator):
485485
receive_timeout: float = 60.0
486486
bind_dn_template: Annotated[list[str], OneOrMany] = []
487487
allowed_groups: list[str] = []
488-
lookup_dn: bool
489-
user_search_base: str
490-
user_attribute: str
488+
lookup_dn: bool = False
489+
user_search_base: Optional[str] = None
490+
user_attribute: Optional[str] = None
491491
lookup_dn_search_filter: Optional[str] = "({login_attr}={login})"
492-
lookup_dn_search_user: Optional[str]
493-
lookup_dn_search_password: Optional[str]
494-
lookup_dn_user_dn_attribute: Optional[str]
495-
escape_userdn: bool
496-
search_filter: str
492+
lookup_dn_search_user: Optional[str] = None
493+
lookup_dn_search_password: Optional[str] = None
494+
lookup_dn_user_dn_attribute: Optional[str] = None
495+
escape_userdn: bool = False
496+
search_filter: str = ""
497497
attributes: list[str] = []
498498
auth_state_attributes: list[str] = []
499-
use_lookup_dn_username: bool
499+
use_lookup_dn_username: bool = True
500500

501501
async def resolve_username(self, username_supplied_by_user):
502502
import ldap3

0 commit comments

Comments
 (0)