all: stabilize client OAuth support (#861)
Also fix lint errors that were hidden because of the build tag.
This commit is contained in:
parent
c1a12cfeda
commit
638d404e0d
1 changed files with 387 additions and 915 deletions
|
|
@ -6,8 +6,6 @@
|
|||
// as part of Enterprise Managed Authorization (SEP-990).
|
||||
// See https://openid.net/specs/openid-connect-core-1_0.html
|
||||
|
||||
//go:build mcp_go_client_oauth
|
||||
|
||||
package extauth
|
||||
|
||||
import (
|
||||
|
|
@ -121,11 +119,11 @@ func initiateOIDCLogin(
|
|||
return nil, nil, fmt.Errorf("RedirectURL is required")
|
||||
}
|
||||
if len(config.Scopes) == 0 {
|
||||
return nil, nil, fmt.Errorf("Scopes is required (must include 'openid')")
|
||||
return nil, nil, fmt.Errorf("at least one scope is required (must include 'openid')")
|
||||
}
|
||||
|
||||
if !slices.Contains(config.Scopes, "openid") {
|
||||
return nil, nil, fmt.Errorf("Scopes must include 'openid' for OIDC")
|
||||
return nil, nil, fmt.Errorf("the 'openid' scope is required for OIDC")
|
||||
}
|
||||
|
||||
if err := checkURLScheme(config.IssuerURL); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue