Skip to main content

Module auth

Module auth 

Source
Available on crate feature payments only.
Expand description

Payment authorization, actor binding, and audit integration points.

The types in this module keep authenticated request identity separate from session identity and protocol actor roles while integrating with adk-auth for scope checks and audit sink emission across ACP stable 2026-01-30 and AP2 v0.1-alpha (2026-03-22) flows.

Structs§

AuthenticatedPaymentRequest
Authenticated request identity carried into payment tools or endpoints.
PaymentAuditor
Emits structured payment audit events through an adk-auth audit sink.

Enums§

PaymentOperation
Payment-sensitive operations that map to named scopes and audit resources.
PaymentsAuthError
Local payment-auth errors mapped into the ADK structured error envelope.

Constants§

ALL_PAYMENT_SCOPES
Catalog of all currently defined payment scopes.
CHECKOUT_CANCEL_SCOPES
Scope set for checkout cancelation.
CHECKOUT_COMPLETE_SCOPES
Scope set for checkout completion.
CHECKOUT_CREATE_SCOPES
Scope set for checkout creation.
CHECKOUT_UPDATE_SCOPES
Scope set for checkout updates.
CREDENTIAL_DELEGATE_SCOPES
Scope set for delegated credential usage.
INTERVENTION_CONTINUE_SCOPES
Scope set for intervention continuation.
ORDER_UPDATE_SCOPES
Scope set for order updates.
PAYMENT_ADMIN_SCOPE
Scope for administrative payment operations.
PAYMENT_CHECKOUT_CANCEL_SCOPE
Scope for checkout cancelation.
PAYMENT_CHECKOUT_COMPLETE_SCOPE
Scope for checkout completion.
PAYMENT_CHECKOUT_CREATE_SCOPE
Scope for checkout creation.
PAYMENT_CHECKOUT_UPDATE_SCOPE
Scope for checkout updates.
PAYMENT_CREDENTIAL_DELEGATE_SCOPE
Scope for delegated credential use.
PAYMENT_INTERVENTION_CONTINUE_SCOPE
Scope for payment intervention continuation.
PAYMENT_ORDER_UPDATE_SCOPE
Scope for order mutation after checkout.
PAYMENT_SETTLEMENT_SCOPE
Scope for settlement-specific operations.
SETTLEMENT_SCOPES
Scope set for settlement operations.

Functions§

check_payment_operation_scopes
Checks that the granted scopes authorize one payment operation.