Token Request (Beta)
The beta_token_request block in the Backend Block context configures a request to get a token used to authorize backend requests.
| Block name | Context | Label |
|---|---|---|
beta_token_request | Backend Block | ⚠ A Token Request (Beta) Block w/o a label has an implicit label "default". Only one Token Request (Beta) Block w/ label "default" per Backend Block is allowed. |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
backend | string | - | |
body | string | - | Creates implicit default Content-Type: text/plain header field. |
expected_status | tuple (int) | [] | If defined, the response status code will be verified against this list of status codes, If the status code is unexpected a beta_backend_token_request error can be handled with an error_handler. |
form_body | string | - | Creates implicit default Content-Type: application/x-www-form-urlencoded header field. |
headers | object | - | Sets the given request HTTP header fields. |
json_body | null, bool, number, string, object, tuple | - | Creates implicit default Content-Type: application/json header field. |
method | string | "GET" | The request method. |
query_params | object | - | Sets the URL query parameters. |
token | string | - | The token to be stored in backends.<backend_name>.tokens.<token_request_name>. |
ttl | string | - | The time span for which the token is to be stored. |
url | string | - | URL of the resource to request the token from. May be relative to an origin specified in a referenced or nested backend block. |
If the url attribute is specified and its value is an absolute URL, the protocol and host parts must be the same as in the value of the {origin} attribute of the used backend.
Nested Blocks
| Name | Description |
|---|---|
backend | Configures a backend for the token request (zero or one). Mutually exclusive with backend attribute. |