The HTTP authorization credentials in the result of using `HTTPBearer` or `HTTPDigest` in a dependency. The HTTP authorization header value is split by the first space. The first part is the `scheme`, the second part is the `credentials`. For example, in an HTTP Bearer token
| 27 | |
| 28 | |
| 29 | class HTTPAuthorizationCredentials(BaseModel): |
| 30 | """ |
| 31 | The HTTP authorization credentials in the result of using `HTTPBearer` or |
| 32 | `HTTPDigest` in a dependency. |
| 33 | |
| 34 | The HTTP authorization header value is split by the first space. |
| 35 | |
| 36 | The first part is the `scheme`, the second part is the `credentials`. |
| 37 | |
| 38 | For example, in an HTTP Bearer token scheme, the client will send a header |
| 39 | like: |
| 40 | |
| 41 | ``` |
| 42 | Authorization: Bearer deadbeef12346 |
| 43 | ``` |
| 44 | |
| 45 | In this case: |
| 46 | |
| 47 | * `scheme` will have the value `"Bearer"` |
| 48 | * `credentials` will have the value `"deadbeef12346"` |
| 49 | """ |
| 50 | |
| 51 | scheme: Annotated[ |
| 52 | str, |
| 53 | Doc( |
| 54 | """ |
| 55 | The HTTP authorization scheme extracted from the header value. |
| 56 | """ |
| 57 | ), |
| 58 | ] |
| 59 | credentials: Annotated[ |
| 60 | str, |
| 61 | Doc( |
| 62 | """ |
| 63 | The HTTP authorization credentials extracted from the header value. |
| 64 | """ |
| 65 | ), |
| 66 | ] |
| 67 | |
| 68 | |
| 69 | class HTTPBase(SecurityBase): |