cadrumo.application.auth.operator_result_projections module

Result projections for the operator-facing auth application services.

auth_status_from_projection(projection)[source]

Project the canonical state projection into the AuthStatusResult emit shape.

The AuthStatusResult is a CLI emit shape derived from the one OperatorStateProjection; it is not a second state-assembly path. backend_configured mirrors the single canonical configured, and backend_available mirrors the single canonical available.

Return type:

AuthStatusResult

Parameters:

projection (OperatorStateProjection)

auth_configure_result(*, state, provider, certificate_path)[source]

Build a redacted configuration result that exposes identity readiness.

Return type:

AuthConfigureResult

Parameters:
incomplete_auth_configuration_verdict(*, provider, certificate_path, profile_tax_id_present, provider_identity_present, identity_alignment)[source]

Record an incomplete configuration without inventing a recovery command.

Choosing a certificate file or changing one of two competing identities is an operator decision. The application records the exact failed condition, but cannot honestly materialise a single executable command from those facts.

Return type:

PreconditionVerdict

Parameters:
  • provider (str)

  • certificate_path (Path | None)

  • profile_tax_id_present (bool)

  • provider_identity_present (bool)

  • identity_alignment (str)

identity_alignment_detail(alignment, *, profile_tax_id, provider_identity)[source]

Explain a Cl@ve identity-alignment verdict in operator language.

Return type:

str

Parameters:
  • alignment (str)

  • profile_tax_id (str)

  • provider_identity (str)

certificate_completeness(provider, certificate_path)[source]

Report whether a configured provider is operationally complete.

Return type:

tuple[bool, str]

Parameters:
  • provider (str)

  • certificate_path (Path | None)