API Reference#
Authorization helpers.
- vws_auth_tools.rfc_1123_date()#
Return the date formatted as per RFC 2616, section 3.3.1, rfc1123-date.
This is the date needed by the VWS API, as described in https://library.vuforia.com/articles/Training/Using-the-VWS-API.
- Return type:
- vws_auth_tools.authorization_header(access_key, secret_key, method, content, content_type, date, request_path)#
Get an Authentication header for the VWS API.
This can be used for a request made to the VWS API with the given attributes.
See https://library.vuforia.com/articles/Training/Using-the-VWS-API.
- Parameters:
access_key (
str
) – A VWS server or client access key.secret_key (
str
) – A VWS server or client secret key.method (
str
) – The HTTP method which will be used in the request.content (
bytes
) – The request body which will be used in the request.content_type (
str
) – The Content-Type header which is expected by endpoint. This does not necessarily have to match the Content-Type sent in the headers. In particular, for the query API, this must be set to multipart/form-data but the header must include the boundary.date (
str
) – The current date which must exactly match the date sent in the Date header.request_path (
str
) – The path to the endpoint which will be used in the request.
- Return type:
- Returns:
An Authorization header which can be used for a request made to the VWS API with the given attributes.