Skip to content

fix(server): return fresh compose challenges for malformed credentials - #132

Open
crazywriter1 wants to merge 1 commit into
tempoxyz:mainfrom
crazywriter1:fix/compose-malformed-credential-challenge-v2
Open

fix(server): return fresh compose challenges for malformed credentials#132
crazywriter1 wants to merge 1 commit into
tempoxyz:mainfrom
crazywriter1:fix/compose-malformed-credential-challenge-v2

Conversation

@crazywriter1

Copy link
Copy Markdown

Summary

  • Return fresh WWW-Authenticate challenges from ComposeMiddleware when a Payment credential is malformed.
  • Fan out all compose challenges when ParseCredential fails.
  • Reissue a matching entry challenge when the echoed request is invalid but method/intent are known.
  • Align compose retry UX with ChargeMiddleware and VerifyOrChallenge.

Context

Previously, compose routes returned only a problem+json error for malformed credentials, while the standard charge path returned a fresh retry challenge. Wallet clients had no challenge to retry against on compose-protected routes.

Test plan

  • go test ./pkg/server/... -run Compose
  • go test ./...

ComposeMiddleware now fans out fresh challenges when ParseCredential fails
and reissues a matching entry challenge for invalid echoed requests, aligned
with ChargeMiddleware and VerifyOrChallenge retry behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant