You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`timeout`| Maximum amount of seconds to wait for a token to be received once requested. | Optional | 60 |
307
-
|`header_name`| Name of the header field used to send token. | Optional | Authorization |
308
-
|`header_value`| Format used to send the token value. "{token}" must be present as it will be replaced by the actual token. | Optional | Bearer {token} |
309
-
|`scope`| Scope parameter sent to token URL as body. Can also be a list of scopes. | Optional ||
310
-
|`token_field_name`| Field name containing the token. | Optional | access_token |
311
-
|`early_expiry`| Number of seconds before actual token expiry where token will be considered as expired. Used to ensure token will not expire between the time of retrieval and the time the request reaches the actual server. Set it to 0 to deactivate this feature and use the same token until actual expiry. | Optional | 30.0 |
312
-
|`client`|`httpx.Client` instance that will be used to request the token. Use it to provide a custom proxying rule for instance. | Optional ||
301
+
| Name | Description | Mandatory | Default value |
|`client_auth`| Client authentication if the client type is confidential or the client was issued client credentials (or assigned other authentication requirements). Can be a tuple or any httpx authentication class instance. | Optional ||
307
+
|`timeout`| Maximum amount of seconds to wait for a token to be received once requested. | Optional | 60 |
308
+
|`header_name`| Name of the header field used to send token. | Optional | Authorization |
309
+
|`header_value`| Format used to send the token value. "{token}" must be present as it will be replaced by the actual token. | Optional | Bearer {token} |
310
+
|`scope`| Scope parameter sent to token URL as body. Can also be a list of scopes. | Optional ||
311
+
|`token_field_name`| Field name containing the token. | Optional | access_token |
312
+
|`early_expiry`| Number of seconds before actual token expiry where token will be considered as expired. Used to ensure token will not expire between the time of retrieval and the time the request reaches the actual server. Set it to 0 to deactivate this feature and use the same token until actual expiry. | Optional | 30.0 |
313
+
|`client`|`httpx.Client` instance that will be used to request the token. Use it to provide a custom proxying rule for instance. | Optional ||
313
314
314
315
Any other parameter will be put as body parameter in the token URL.
315
316
317
+
#### Common providers
318
+
319
+
Most of [OAuth2](https://oauth.net/2/) Resource Owner Password Credentials providers are supported.
320
+
321
+
If the one you are looking for is not yet supported, feel free to [ask for its implementation](https://github.com/Colin-b/httpx_auth/issues/new).
|`timeout`| Maximum amount of seconds to wait for a token to be received once requested. | Optional | 60 |
349
+
|`header_name`| Name of the header field used to send token. | Optional | Authorization |
350
+
|`header_value`| Format used to send the token value. "{token}" must be present as it will be replaced by the actual token. | Optional | Bearer {token} |
351
+
|`scope`| Scope parameter sent in query. Can also be a list of scopes. | Optional | openid |
352
+
|`token_field_name`| Field name containing the token. | Optional | access_token |
353
+
|`early_expiry`| Number of seconds before actual token expiry where token will be considered as expired. Used to ensure token will not expire between the time of retrieval and the time the request reaches the actual server. Set it to 0 to deactivate this feature and use the same token until actual expiry. | Optional | 30.0 |
354
+
|`client`|`httpx.Client` instance that will be used to request the token. Use it to provide a custom proxying rule for instance. | Optional ||
355
+
356
+
Any other parameter will be put as body parameters in the token URL.
357
+
358
+
316
359
### Client Credentials flow
317
360
318
361
Client Credentials Grant is implemented following [rfc6749](https://tools.ietf.org/html/rfc6749#section-4.4).
0 commit comments