feat: add Hono and NestJS framework adapters#24
Merged
Conversation
- @authplane/hono and @authplane/nestjs: new framework adapters (Bearer + DPoP per RFC 9449 §7.1, RFC 9728 PRM, RFC 6750 §3 challenges). - @authplane/sdk: bounded TokenCache (configurable maxEntries, LRU) and new @authplane/sdk/core helpers; PRM document URL normalises trailing slashes (RFC 9728 §3.1). - @authplane/mcp / @authplane/fastmcp: accept DPoP-scheme Authorization headers; mcp returns 401 (not 500) on a non-URL aud claim (RFC 8707).
RobertoIskandarani
approved these changes
Jun 11, 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.
Added
@authplane/hono— new Hono adapter:authplaneHonoAuth(),bearerAuthmiddleware (Bearer + DPoP, RFC 9449 §7.1),requireScopeguard, and an RFC 9728 PRM handler.@authplane/nestjs— new NestJS adapter:AuthplaneModule.forRoot()/forRootAsync(),AuthplaneAuthGuard,@SkipAuth()/@RequireScopes()decorators,AuthplaneExceptionFilter(RFC 6750 §3), and a PRM controller (RFC 9728). Supports Express and Fastify.@authplane/sdk—TokenCacheis now bounded by a configurablemaxEntriescap (default10_000) with LRU eviction, viaAuthplaneClient.create({ cacheMaxEntries }).@authplane/sdk— new@authplane/sdk/corehelpers:extractBearerToken,buildRequestUrl,pathAndQueryOf,extractDpopProof,oauthProtectedResourceMetadataPath.Changed
@authplane/sdk—oauthProtectedResourceMetadataDocumentUrl(resource)now normalises trailing slashes (RFC 9728 §3.1) and throws a typedTypeErroron invalid URLs. Migration: drop any deliberate trailing slash fromresourcebefore upgrading — the canonical form is no-trailing-slash.@authplane/mcp— now accepts a DPoP-bound token presented under theDPoPscheme (RFC 9449 §7.1) instead of rejecting it with 401.@authplane/fastmcp— stricter RFC 6750 §2.1Authorizationparsing, consistent with the other adapters.Fixed
@authplane/mcp— a non-URLaudclaim now returns 401invalid_token(RFC 8707) instead of a 500.