pub async fn cross_account_confirm(
profile_id: ProfileId,
source: ObjectRef,
destination: ObjectRef,
store: State<'_, ProfileStoreHandle>,
confirm_cache: State<'_, ConfirmationCacheHandle>,
) -> Result<String, AppError>Expand description
Mint a one-time confirmation token for a large cross-account copy.
The frontend calls this command when object_copy returns a
Validation { field: "confirmed_token" } error. The returned token must
be passed back to object_copy as confirmed_token in the next call.
Tokens are single-use, scoped to exactly the (profile, source, destination) triple, and expire after 5 minutes.
§Note on “heuristic check”
This command does not re-verify that a cross-account error actually
occurred — the frontend is trusted to call it only after receiving the
Validation error from object_copy. The token is harmless if the next
object_copy succeeds via the server-side path (which returns
ServerSideCopy without consulting the token).