class documentation

class TokenAuthentication(BaseAuthentication): (source)

View In Hierarchy

Simple token based authentication. Clients should authenticate by passing the token key in the "Authorization" HTTP header, prepended with the string "Token ". For example: Authorization: Token 401f7ac837da42b97f613d789819ff93537bee6a

Method authenticate Authenticate the request and return a two-tuple of (user, token).
Method authenticate_credentials Undocumented
Method authenticate_header Return a string to be used as the value of the `WWW-Authenticate` header in a `401 Unauthenticated` response, or `None` if the authentication scheme should return `403 Permission Denied` responses.
Method get_model Undocumented
Class Variable keyword Undocumented
Class Variable model Undocumented
def authenticate(self, request): (source)

Authenticate the request and return a two-tuple of (user, token).

def authenticate_credentials(self, key): (source)

Undocumented

def authenticate_header(self, request): (source)

Return a string to be used as the value of the `WWW-Authenticate` header in a `401 Unauthenticated` response, or `None` if the authentication scheme should return `403 Permission Denied` responses.

def get_model(self): (source)

Undocumented

Undocumented

Undocumented