archivebox.ldap.auth

LDAP authentication backend for ArchiveBox.

This module extends django-auth-ldap to support the LDAP_CREATE_SUPERUSER flag.

Module Contents

Classes

ArchiveBoxLDAPBackend

Custom LDAP authentication backend for ArchiveBox.

API

class archivebox.ldap.auth.ArchiveBoxLDAPBackend[source]

Bases: archivebox.ldap.auth.BaseLDAPBackend

Custom LDAP authentication backend for ArchiveBox.

Extends django-auth-ldap’s LDAPBackend to support:

  • LDAP_CREATE_SUPERUSER: Automatically grant superuser privileges to LDAP users

authenticate_ldap_user(ldap_user, password)[source]

Authenticate using LDAP and optionally grant superuser privileges.

This method is called by django-auth-ldap after successful LDAP authentication.