reviewboard.accounts.backends.nis¶
NIS authentication backend.
-
class
NISBackend
[source]¶ Bases:
reviewboard.accounts.backends.base.BaseAuthBackend
Authenticate against a user on an NIS server.
-
authenticate
(username, password, **kwargs)[source]¶ Authenticate the user.
This will authenticate the username and return the appropriate User object, or None.
Parameters: - username (unicode) – The username to authenticate.
- password (unicode) – The password to authenticate.
- **kwargs (dict, unused) – Additional keyword arguments.
Returns: 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.
Parameters: - 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.
Returns: The existing or newly-created user, or
None
if an error was encountered.Return type:
-