Au10tix
Thin HTTP client for the Au10tix BOS4 identity-document verification API, used only by the Au10tix handle task (validate_identity_document (Au10tix)).
components/au10tix/client.py
Base URL |
|
Auth |
|
class Au10tixClient:
def __init__(self):
self.__token = settings.AU10TIX_TOKEN
def send_request(
self,
http_method: str,
url: str,
additional_headers: Optional[dict] = (),
payload: Optional[str] = None,
files: Optional[dict] = None,
query_params: Optional[dict] = None
):
headers = {'Authorization': f'JWT {self.__token}'}
headers.update(additional_headers)
response = requests.request(
method=http_method,
url=url,
params=query_params,
data=payload,
files=files,
headers=headers,
)
response.raise_for_status()
return response.json()
The caller passes the full URL (built from settings.AU10TIX_API_URL), so the client itself
holds no path knowledge. Non-2xx raises HTTPError.
|
This client uses module-level |
Call sequence
| Step | Call |
|---|---|
Submit |
|
Poll |
|
Fetch |
|
Both polling loops use the injected Retry client (10 attempts, 5 s apart) from the handle task.
components/au10tix/request_template/
| File | Purpose |
|---|---|
|
The |
|
|
Fields consumed from the response
The handle task reads:
-
DocumentAuthenticity(top level) —Authenticmeans authentic. -
ProcessingResult.IsDocumentExpired— boolean. -
ProcessingResult.OverallQuality—Acceptable. -
ProcessingResult.DocumentData2.FirstName.Value/.LastName.Value, falling back toFullName.Valuesplit on spaces.
See validate_identity_document (Au10tix) for how those become verdicts.
A mocked result for tests lives at
task/au10tix/handle_identity_document_validation_response/result.mock.json.