Jump to >

djblets.webapi.auth.backends.basic

An authentication backend for HTTP Basic Auth.

class WebAPIBasicAuthBackend[source]

Bases: djblets.webapi.auth.backends.base.WebAPIAuthBackend

Handles HTTP Basic Authentication for the web API.

www_auth_scheme = 'Basic realm="Web API"'[source]

The auth scheme used in the WWW-Authenticate header.

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

__annotations__ = {}