sort grant type supported

Signed-off-by: ariary <ariary9.2@hotmail.fr>
This commit is contained in:
ariary 2021-10-06 08:29:14 -04:00
parent c6f6dd69e9
commit 7bc966217d
2 changed files with 2 additions and 1 deletions

View File

@ -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 {

View File

@ -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 != "" {