vdoc.api.dependencies package

Submodules

vdoc.api.dependencies.auth module

Contains all authentication dependencies.

vdoc.api.dependencies.auth.require_authentication(credentials)

FastAPI dependency that checks for HTTP Basic Auth credentials in the request header.

Parameters:

credentials (HTTPBasicCredentials) – The HTTPBasicAuth credentials sent with the request heder.

Raises:

HTTPException – If the credentials are not valid.

Return type:

bool

Returns:

True if the request is authenticated.

Module contents

Contains all FastAPI dependencies.