API Token Authentication
Bases: BaseAuthentication
API Token Authentication
Provides the ability to use the API by using a token to authenticate.
Functions
authenticate_header(request)
authenticate(request)
Authentication the API session using the supplied token
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request |
object
|
API Request Object |
required |
Raises:
Type | Description |
---|---|
AuthenticationFailed
|
'Token header invalid' - Authorization Header Value is not in format |
AuthenticationFailed
|
'Token header invalid. Possibly incorrectly formatted' - Authentication header value has >1 space |
AuthenticationFailed
|
'Invalid token header. Token string should not contain invalid characters.' - Authorization header contains non-unicode chars |
Returns:
Name | Type | Description |
---|---|---|
None |
None
|
User not authenticated |
tuple |
(user, token)
|
User authenticated |
About:
This page forms part of our Project Centurion ERP.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2024-06-29
Date Edited: 2024-07-13
Contribution:
Would You like to contribute to our Centurion ERP project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors