simdb.remote.core.auth.ldap module¶
- class simdb.remote.core.auth.ldap.LdapAuthenticator[source]¶
Bases:
AuthenticatorAuthenticator for authenticating using an LDAP server.
This requires the following extra parameters in the server configuration: ldap_server - the URI of the LDAP server ldap_bind - the bind string for the LDAP authentication (formatted to
replace {username} with username)
ldap_query_user - the bind string for the LDAP query ldap_query_password - the password for the LDAP query ldap_query_base - the base point for the LDAP query ldap_query_filter - the filter to apply to the LDAP query (formatted to replace
{username} with username)
- authenticate(config: Config, request: Request) User | None[source]¶
Authenticate the user using parameters passed in the current request - i.e. username/password passed as part of SimpleAuth or a token in the request header.
Additional authentication options can be defined in the configuration specific to the type of authentication being performed - i.e. connection URI for LDAP server.