cadrumo.application.auth.catalogue module

Typed catalogue for aeat config auth providers.

AuthProviderListing records feed AUTH_PROVIDER_CATALOGUE; the catalogue is derived from the executable AuthProviderKind authority.

class AuthProviderListing(**data)[source]

Bases: BaseModel

One row in the aeat config auth providers catalogue.

Variables:
  • id – Stable lowercase identifier ("certificate", "clave_movil"). The CLI passes this verbatim through --provider; the configure / login commands resolve it against the backend registry.

  • label – Translation key for display label.

  • description – Translation key for one-paragraph operator-facing description.

Parameters:
id: str
label: tr
description: tr
AUTH_PROVIDER_CATALOGUE: tuple[AuthProviderListing, ...]

Catalogue of auth provider entries in display order.

list_auth_providers()[source]

Return the auth provider catalogue.

Wraps AUTH_PROVIDER_CATALOGUE so callers have a stable function-call site.

Returns a tuple of AuthProviderListing entries.

Return type:

tuple[AuthProviderListing, ...]

known_auth_provider_ids()[source]

Return every executable provider id.

Return type:

tuple[str, ...]

get_auth_provider(provider_id)[source]

Resolve a provider id to its catalogue listing.

Provider ids are exact. Retired spellings and unavailable providers are rejected instead of being carried as alternate paths.

Parameters:

provider_id (str) – The provider identifier to look up (case-insensitive, leading/trailing whitespace stripped before comparison).

Return type:

AuthProviderListing

Returns:

The matching AuthProviderListing from the catalogue.

Raises:

KeyError – When provider_id is not in the catalogue. The CLI’s configure / login commands catch this and render an operator-facing “unknown provider” error.