Skip to content

feat(server): add credential resolver#488

Draft
deodad wants to merge 1 commit into
mainfrom
dad/indexer-api-key-gateway
Draft

feat(server): add credential resolver#488
deodad wants to merge 1 commit into
mainfrom
dad/indexer-api-key-gateway

Conversation

@deodad
Copy link
Copy Markdown
Contributor

@deodad deodad commented May 31, 2026

Summary

Adds a top-level server credential resolver for no-credential requests.

Motivation

API-key gateways and other local auth layers need a clean way to turn request context into a normal MPPX credential before falling back to 402.

Changes

  • Added credentialResolver to Mppx.create config in src/server/Mppx.ts.
  • Resolved credentials fall through to the existing verification path; explicit Authorization credentials still win.
  • Added request-handler tests for object credentials, serialized credentials, 402 fallback, and Authorization precedence.

Testing

  • pnpm exec vp test src/server/Mppx.test.ts - 143 passed
  • pnpm check:types
  • pnpm check

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 31, 2026

Open in StackBlitz

npm i https://pkg.pr.new/mppx@488

commit: a91b96f

@deodad deodad force-pushed the dad/indexer-api-key-gateway branch from 0ff6650 to a91b96f Compare May 31, 2026 14:41
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