go-sdk/auth
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eliya Sadan d6d6edd6d4
auth: add OAuth 2.0 Protected Resource Metadata handler
This change adds support for RFC 9728 (OAuth 2.0 Protected Resource Metadata)
by introducing a `ProtectedResourceMetadataHandler`.

The handler includes built-in CORS support with `Access-Control-Allow-Origin: *`
by default, as OAuth metadata is public information meant for client discovery.

Documentation includes examples for using custom CORS policies with
popular middleware libraries (github.com/rs/cors and github.com/jub0bs/cors).

The implementation follows RFC 9728 §3.1 for OAuth 2.0 Authorization Server
Metadata discovery, enabling clients to discover protected resource capabilities
and authentication requirements.
2025-12-08 14:54:52 -05:00
..
auth.go auth: add OAuth 2.0 Protected Resource Metadata handler 2025-12-08 14:54:52 -05:00
auth_test.go auth: add OAuth 2.0 Protected Resource Metadata handler 2025-12-08 14:54:52 -05:00
client.go auth: change OAuthHandler to take http Request and Response (#603) 2025-10-29 10:08:40 -04:00
client_test.go auth: change OAuthHandler to take http Request and Response (#603) 2025-10-29 10:08:40 -04:00