cadrumo.application.auth.providers module

Application-owned authentication provider contract and selection service.

class AuthProvider(*args, **kwargs)[source]

Bases: Protocol

Contract implemented by the concrete outbound AEAT providers.

kind: AuthProviderKind
async authenticate()[source]

Establish an authenticated AEAT session.

Return type:

AeatSession

async verify(session)[source]

Verify an acquired AEAT session.

Return type:

AeatLoginAssertion

Parameters:

session (AeatSession)

describe()[source]

Describe the provider without exposing secret material.

Return type:

AuthProviderDescription

async close()[source]

Release every provider-owned resource.

Return type:

None

class AuthProviderSelector(*args, **kwargs)[source]

Bases: Protocol

Concrete-provider constructor supplied by outward composition.

bind_auth_provider_selector(selector)[source]

Bind the outward concrete-provider composition for one runtime scope.

Return type:

Generator[AuthProviderSelector]

Parameters:

selector (AuthProviderSelector)

select_provider(kind, *, settings, certificate_secret_backend_factory, browser_session_factory=None, certificate_credentials=None, operator_scope_ports)[source]

Construct the concrete outbound provider for kind.

Certificate credentials are resolved once at the application boundary before construction so a missing named-source secret cannot fall through to an unrelated global password.

Return type:

AuthProvider

Parameters: