Jump to >

reviewboard.accounts.backends

Forwarding imports and legacy utilities for authentication backends.

This module provides legacy functionality for registering authentication backends, along with forwarding imports for:

ActiveDirectoryBackend Authenticate a user against an Active Directory server.
BaseAuthBackend Base class for a Review Board authentication backend.
HTTPDigestBackend Authenticate against a user in a digest password file.
LDAPBackend Authentication backend for LDAP servers.
NISBackend Authenticate against a user on an NIS server.
AuthBackendRegistry A registry for managing authentication backends.
auth_backends Registry instance for working with available authentication backends.
get_enabled_auth_backends Return all authentication backends being used by Review Board.
StandardAuthBackend Authenticate users against the local database.
X509Backend Authenticate a user from a X.

Changed in version 3.0: The contents of this module were split into sub-modules.

AuthBackend[source]

alias of reviewboard.accounts.backends.base.BaseAuthBackend

get_registered_auth_backends()[source]

Yield all registered Review Board authentication backends.

This will return all backends provided both by Review Board and by third parties that have properly registered with the reviewboard.auth_backends entry point.

Deprecated since version 3.0: Iterate over auth_backends instead.

Yields:type – The BaseAuthBackend subclasses.
get_registered_auth_backend(backend_id)[source]

Return the authentication backend with the specified ID.

Deprecated since version 3.0: Use auth_backends.get_auth_backend() instead.

Parameters:backend_id (unicode) – The ID of the backend to retrieve.
Returns:The authentication backend, or None if it could not be found.
Return type:reviewboard.accounts.backends.base.BaseAuthBackend
register_auth_backend(backend_cls)[source]

Register an authentication backend.

This backend will appear in the list of available backends. The backend class must have a backend_id attribute set, and can only be registered once.

Deprecated since version 3.0: Use auth_backends.register() instead.

Parameters:backend_cls (type) – The subclass of BaseAuthBackend to register.
Raises:KeyError – A backend already exists with this ID.
unregister_auth_backend(backend_cls)[source]

Unregister a previously registered authentication backend.

Deprecated since version 3.0: Use auth_backends.unregister() instead.

Parameters:backend_cls (type) – The subclass of BaseAuthBackend to unregister.