mcp: OIDC-Flavored Refresh Token Guidance (#939)

## Description

Implemets SEP-2207
(https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance)

Fixes #940
This commit is contained in:
Guglielmo Colombo 2026-05-06 15:43:26 +02:00 • committed by GitHub
commit 438cd4384c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -82,6 +82,9 @@ type Config struct {
// ClientCredentialsConfig enables RFC 6749 Section 4.4 client credentials
// grant at the /token endpoint.
ClientCredentialsConfig *ClientCredentialsConfig
// ScopesSupported is an optional list of scopes to advertise in the
// authorization server metadata.
ScopesSupported []string
}
// FakeAuthorizationServer is a fake OAuth 2.0 Authorization Server for testing.
@ -166,6 +169,7 @@ func (s *FakeAuthorizationServer) handleMetadata(w http.ResponseWriter, r *http.
AuthorizationEndpoint: s.URL() + s.config.IssuerPath + "/authorize",
TokenEndpoint: s.URL() + s.config.IssuerPath + "/token",
RegistrationEndpoint: registrationEndpoint,
ScopesSupported: s.config.ScopesSupported,
ResponseTypesSupported: []string{"code"},
CodeChallengeMethodsSupported: []string{"S256"},
ClientIDMetadataDocumentSupported: cimdSupported,