Jump to >


NIS authentication backend.

class NISBackend[source]

Bases: reviewboard.accounts.backends.base.BaseAuthBackend

Authenticate against a user on an NIS server.

backend_id = 'nis'[source]

The unique ID for the authentication backend.

name = 'NIS'[source]

The display name for the authentication backend.

This will be shown in the list of backends in the administration UI.


alias of reviewboard.accounts.forms.auth.NISSettingsForm

login_instructions = 'Use your standard NIS username and password.'[source]

Authentication instructions to display above the Login form.

authenticate(request, username, password, **kwargs)[source]

Authenticate the user.

This will attempt to authenticate the user against NIS. If the username and password are valid, a user will be returned, and added to the database if it doesn’t already exist.

Changed in version 4.0: The request argument is now mandatory as the first positional argument, as per requirements in Django.

  • request (django.http.HttpRequest) – The HTTP request from the caller. This may be None.

  • username (unicode) – The username to authenticate.

  • password (unicode) – The password to authenticate.

  • **kwargs (dict, unused) – Additional keyword arguments.


The authenticated user, or None if the user could not be authenticated.

Return type


get_or_create_user(username, request=None, passwd=None)[source]

Return an existing user, or create one if it does not exist.

  • username (unicode) – The username of the user.

  • request (django.http.HttpRequest, optional) – The HTTP request from the client.

  • passwd (tuple, optional) – The parsed NIS passwd entry for the user.


The existing or newly-created user, or None if an error was encountered.

Return type


__annotations__ = {}