From b29cf8cc92607e13457dba8331f5c9286054c8c1 Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Fri, 31 Aug 2018 19:33:00 +0200 Subject: [PATCH] cmd: Do not split empty scope (#45) 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(