Skip to content

common_auth.schemas.authenticators.configs

Resource-request authentication settings; construction performs no I/O.

Classes

ApiKeyAuthConfig

Bases: _AuthenticatorConfig

Place one API key in an explicitly named header or query parameter.

Fields and properties declared here; inherited members belong to the bases above.

credential

credential: CredentialConfig = Field(repr=False)

location

location: HttpCredentialLocation = Field(strict=False)

method

method: Literal[HttpAuthenticationMethod.API_KEY] = HttpAuthenticationMethod.API_KEY

name

name: _IdentityText

BasicAuthConfig

Bases: _AuthenticatorConfig

HTTP Basic username/password encoding; UTF-8 unless explicitly configured.

Fields and properties declared here; inherited members belong to the bases above.

credential

credential: CredentialConfig = Field(repr=False)

encoding

encoding: str = 'utf-8'

method

method: Literal[HttpAuthenticationMethod.BASIC] = HttpAuthenticationMethod.BASIC

BearerAuthConfig

Bases: _AuthenticatorConfig

Attach an injected token; challenge replay is explicitly bounded and off by default.

A replay also requires a replayable request and a recognized recoverable challenge. Token acquisition, refresh and storage belong to their runtime.

Fields and properties declared here; inherited members belong to the bases above.

max_challenge_replays

max_challenge_replays: int = Field(default=0, ge=0)

method

method: Literal[HttpAuthenticationMethod.BEARER] = HttpAuthenticationMethod.BEARER

HmacAuthConfig

Bases: _AuthenticatorConfig

Sign with a raw shared key and an injected request-signing profile.

The profile owns canonicalization, signature placement, timestamps and nonce rules. An optional API key identifies the caller separately from the signer.

Fields and properties declared here; inherited members belong to the bases above.

algorithm

algorithm: Literal[SignatureAlgorithm.HMAC_SHA256] = SignatureAlgorithm.HMAC_SHA256

api_key

api_key: CredentialConfig | None = Field(default=None, repr=False)

credential

credential: CredentialConfig = Field(repr=False)

method

method: Literal[HttpAuthenticationMethod.HMAC] = HttpAuthenticationMethod.HMAC

SignedJwtAuthConfig

Bases: _AuthenticatorConfig

Sign request JWTs using an injected claims/placement profile.

Key parsing and cryptographic compatibility are signer responsibilities. Configuration only rejects known representation/algorithm mismatches.

Fields and properties declared here; inherited members belong to the bases above.

algorithm

algorithm: SignatureAlgorithm = Field(strict=False)

credential

credential: CredentialConfig = Field(repr=False)

key_id

key_id: KeyId | None = None

lifetime_sec

lifetime_sec: float = Field(default=120.0, gt=0, allow_inf_nan=False)

method

method: Literal[HttpAuthenticationMethod.SIGNED_JWT] = HttpAuthenticationMethod.SIGNED_JWT