nat.authentication.http_basic_auth.http_basic_auth_provider#

Classes#

HTTPBasicAuthProvider

Abstract base class for HTTP Basic Authentication exchangers.

Module Contents#

class HTTPBasicAuthProvider(
config: nat.data_models.authentication.AuthProviderBaseConfig,
)#

Bases: nat.authentication.interfaces.AuthProviderBase

Abstract base class for HTTP Basic Authentication exchangers.

Initialize the HTTP Basic Auth Exchanger with the given configuration.

_authenticated_tokens: dict[str, nat.data_models.authentication.AuthResult]#
async authenticate(
user_id: str | None = None,
) nat.data_models.authentication.AuthResult#

Performs simple HTTP Authentication using the provided user ID.