From d4be0846c33b0e7c86445d4a2f5ed278cdcd0bdf Mon Sep 17 00:00:00 2001 From: arekkas Date: Fri, 31 Aug 2018 19:02:33 +0200 Subject: [PATCH] cmd: Do not split empty scope Signed-off-by: arekkas --- cmd/server/serve.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/server/serve.go b/cmd/server/serve.go index d8f588057..5ea568e7e 100644 --- a/cmd/server/serve.go +++ b/cmd/server/serve.go @@ -24,12 +24,12 @@ package server import ( "fmt" "net/http" - "strings" "github.com/julienschmidt/httprouter" "github.com/meatballhat/negroni-logrus" "github.com/ory/fosite" "github.com/ory/go-convenience/corsx" + "github.com/ory/go-convenience/stringsx" "github.com/ory/graceful" "github.com/ory/herodot" "github.com/ory/keto/authentication" @@ -81,7 +81,7 @@ func RunServe( viper.GetString("AUTHENTICATOR_OAUTH2_INTROSPECTION_CLIENT_SECRET"), viper.GetString("AUTHENTICATOR_OAUTH2_INTROSPECTION_TOKEN_URL"), viper.GetString("AUTHENTICATOR_OAUTH2_INTROSPECTION_URL"), - strings.Split(viper.GetString("AUTHENTICATOR_OAUTH2_INTROSPECTION_SCOPE"), ","), + stringsx.Splitx(viper.GetString("AUTHENTICATOR_OAUTH2_INTROSPECTION_SCOPE"), ","), strategy, ), "oauth2/clients": authentication.NewOAuth2ClientCredentialsAuthentication(