Skip to main content

Function: createProtectedResourceMetadataMiddleware()

createProtectedResourceMetadataMiddleware(args): Middleware

Defined in: http-server-oauth/src/index.ts:258

Koa middleware that serves GET /.well-known/oauth-protected-resource (RFC 9728). Mount it before oauthVerify so the discovery endpoint stays unauthenticated (clients fetch it before they have a token).

Parameters

ParameterTypeDescription
args{ authorizationServers: string[]; resource: string; }-
args.authorizationServersstring[]Authorization server issuer URIs that issue tokens for this resource.
args.resourcestringThe protected resource's identifier URI.

Returns

Middleware