protectedResource

fun protectedResource(resource: String, configure: ProtectedResourceMetadataConfig.() -> Unit = {})(source)

Configures OAuth 2.0 Protected Resource Metadata (RFC 9728).

When configured, the plugin serves a /.well-known/oauth-protected-resource endpoint with metadata for this resource and includes a resource_metadata parameter in WWW-Authenticate headers on Bearer authentication failures.

Report a problem