Add GET /api/keys/public route for grant signature verification#91
Merged
NoahCardoza merged 2 commits intofeat/issue-49__phase-2-client-serverfrom Feb 28, 2026
Merged
Conversation
…g key Co-authored-by: NoahCardoza <10343470+NoahCardoza@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Client-Server Mode with password auth and signed grants
Add GET /api/keys/public route for grant signature verification
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GrantVerifier.fetchPublicKey()fetches the server's Ed25519 public key fromGET /api/keys/publicto verify JWS grant signatures, but that route didn't exist — making client-side grant verification always fail with a 404.Changes
Serviceinterface — addedkeys.getPublicKey(): Promise<string>returning SPKI PEMLocalService— storespublicKey: KeyObjectin deps; exports it as SPKI PEM viakeys.getPublicKey();resolveServicenow destructures both keys fromloadOrGenerateKeyPairRemoteService— implementskeys.getPublicKey()by proxying toGET /api/keys/publicroutes.ts— adds the missing route, auth-protected by the existing bearer middleware:LocalServiceconstructor calls inservice.test.tsandclient-server-flow.test.ts; added mock and route tests inroutes.test.ts💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.