cadrumo.adapters.outbound.aeat.auth.providers module

Provider-specific AEAT session details and context provisioners.

core.auth_provider.AuthProviderKind and core.auth_provider.AuthProviderDescription are the layer-neutral provider authorities. application.auth.providers.AuthProvider is the application protocol, and core.i18n.auth_provider.describe_auth_provider_operator_impact() is the canonical localized renderer. This module owns only the provider-specific payloads used by AeatSession and AeatLoginAssertion, plus the certificate browser-context provisioner that wires PKCS#12 credentials into Playwright contexts.

class CertificateContextProvisioner(cert)[source]

Bases: object

Browser-context provisioner for the certificate-backed AEAT auth flow.

Implements BrowserContextProvisioner for PKCS#12 client-certificate authentication. build_context_kwargs wires the loaded certificate into Playwright’s client_certificates list so every TLS connection the browser makes to the AEAT origin presents the certificate automatically. The provisioner contributes only the Playwright client-certificate construction argument. Authentication is proved by the subsequent canonical protected-resource navigation, never by a context marker.

Parameters:

cert (LoadedCertificate)

build_context_kwargs()[source]

Return the Playwright new_context() kwargs that wire the certificate.

Return type:

BrowserContextKwargs

Returns:

A BrowserContextKwargs mapping with client_certificates populated for the bound origin.