diff --git a/server/handlers.go b/server/handlers.go index cbdf5f5b..37a1f9ac 100755 --- a/server/handlers.go +++ b/server/handlers.go @@ -110,7 +110,6 @@ func (s *Server) discoveryHandler() (http.HandlerFunc, error) { sort.Strings(d.ResponseTypes) d.GrantTypes = s.supportedGrantTypes - sort.Strings(d.GrantTypes) data, err := json.MarshalIndent(d, "", " ") if err != nil { diff --git a/server/server.go b/server/server.go index 619a358f..ecd6c935 100755 --- a/server/server.go +++ b/server/server.go @@ -11,6 +11,7 @@ import ( "net/url" "os" "path" + "sort" "strconv" "strings" "sync" @@ -225,6 +226,7 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy) if c.PasswordConnector != "" { supportedGrant = append(supportedGrant, grantTypePassword) } + sort.Strings(supportedGrant) webFS := web.FS() if c.Web.Dir != "" {