Skip to content

Commit

Permalink
sort grant type supported
Browse files Browse the repository at this point in the history
Signed-off-by: ariary <ariary9.2@hotmail.fr>
  • Loading branch information
ariary committed Oct 6, 2021
1 parent c6f6dd6 commit 7bc9662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/url"
"os"
"path"
"sort"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 7bc9662

Please sign in to comment.