Jump to >

This documentation covers the in-development release of Djblets. You can see the latest stable docs or all previous versions.

djblets.webapi.auth.backends.basic

An authentication backend for HTTP Basic Auth.

class WebAPIBasicAuthBackend[source]

Handles HTTP Basic Authentication for the web API.

get_credentials(request)[source]

Return credentials provided in the request.

This returns a dictionary of all credentials necessary for this auth backend. By default, this expects username and password, though more specialized auth backends may provide other information. These credentials will be passed to login_with_credentials().

This function must be implemented by the subclass.

Parameters

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

Returns

A dictionary of credential information.

Return type

dict