mirror of https://github.com/portainer/portainer
refactor(oauth): remove separation of strings
parent
de5f6086d0
commit
193e7eb3f8
|
@ -8,7 +8,6 @@ import (
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
@ -110,6 +109,7 @@ func buildConfig(oauthSettings *portainer.OAuthSettings) *oauth2.Config {
|
||||||
ClientSecret: oauthSettings.ClientSecret,
|
ClientSecret: oauthSettings.ClientSecret,
|
||||||
Endpoint: endpoint,
|
Endpoint: endpoint,
|
||||||
RedirectURL: oauthSettings.RedirectURI,
|
RedirectURL: oauthSettings.RedirectURI,
|
||||||
Scopes: strings.Split(oauthSettings.Scopes, ","),
|
// TODO figure out how to handle different providers, see https://github.com/golang/oauth2/issues/119
|
||||||
|
Scopes: []string{oauthSettings.Scopes},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue