Home / Class/ HTTPAuthorizationCredentials Class — fastapi Architecture

HTTPAuthorizationCredentials Class — fastapi Architecture

Architecture documentation for the HTTPAuthorizationCredentials class in http.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  f02893af_38ea_77c3_9c65_1fe36b66ad66["HTTPAuthorizationCredentials"]
  96278b4c_a391_681f_b974_563be8af72ce["http.py"]
  f02893af_38ea_77c3_9c65_1fe36b66ad66 -->|defined in| 96278b4c_a391_681f_b974_563be8af72ce

Relationship Graph

Source Code

fastapi/security/http.py lines 29–66

class HTTPAuthorizationCredentials(BaseModel):
    """
    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 scheme, the client will send a header
    like:

    ```
    Authorization: Bearer deadbeef12346
    ```

    In this case:

    * `scheme` will have the value `"Bearer"`
    * `credentials` will have the value `"deadbeef12346"`
    """

    scheme: Annotated[
        str,
        Doc(
            """
            The HTTP authorization scheme extracted from the header value.
            """
        ),
    ]
    credentials: Annotated[
        str,
        Doc(
            """
            The HTTP authorization credentials extracted from the header value.
            """
        ),
    ]

Domain

Frequently Asked Questions

What is the HTTPAuthorizationCredentials class?
HTTPAuthorizationCredentials is a class in the fastapi codebase, defined in fastapi/security/http.py.
Where is HTTPAuthorizationCredentials defined?
HTTPAuthorizationCredentials is defined in fastapi/security/http.py at line 29.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free