mcp: redirect to upstream oauth2 for authentication (#5594)

This commit is contained in:
Denis Mishin 2025-05-01 12:16:44 -04:00 committed by GitHub
parent 5b024a8ada
commit 561b6040b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 166 additions and 9 deletions

View file

@ -30,10 +30,11 @@ const (
)
type Handler struct {
prefix string
trace oteltrace.TracerProvider
storage *Storage
cipher cipher.AEAD
prefix string
trace oteltrace.TracerProvider
storage *Storage
cipher cipher.AEAD
relyingParties *OAuth2Configs
}
func New(
@ -54,10 +55,11 @@ func New(
}
return &Handler{
prefix: prefix,
trace: tracerProvider,
storage: NewStorage(client),
cipher: cipher,
prefix: prefix,
trace: tracerProvider,
storage: NewStorage(client),
cipher: cipher,
relyingParties: NewOAuthConfig(cfg, http.DefaultClient),
}, nil
}