feature: initial implementation of LDAP/AD sync
This commit is contained in:
parent
77a339f82d
commit
7577eeb493
1 changed files with 7 additions and 0 deletions
|
|
@ -16,6 +16,12 @@ except ImportError:
|
|||
ldap = Missing
|
||||
|
||||
|
||||
@dataclass
|
||||
class UserType:
|
||||
DEFAULT: str = "DEFAULT"
|
||||
ACTIVE_DIRECTORY: str = "ACTIVE_DIRECTORY"
|
||||
|
||||
|
||||
class LdapDao(AuthLdapBase):
|
||||
default_tls_cert_dir = "/etc/openldap/cacerts"
|
||||
|
||||
|
|
@ -116,6 +122,7 @@ class LdapDao(AuthLdapBase):
|
|||
return ldap_conn
|
||||
|
||||
def fetch_all(self, ldap_filter: str = "(objectClass=*)", attributes: List[str] = None) -> Optional[List[dict]]:
|
||||
# TODO: add pagination
|
||||
ldap_conn = None
|
||||
try:
|
||||
if attributes is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue