Allow multiple IDPs config to be passed via struct (#2167)

* Allow multiple IDPs config to be passed via struct

* This removes support for ENV based IDP configuration for console

* Ensure default scopes are used if none are given

* Add display name field for provider config
This commit is contained in:
Aditya Manthramurthy
2022-07-14 07:27:45 -07:00
committed by GitHub
parent abb668633b
commit 118cf97e1d
9 changed files with 119 additions and 20 deletions

View File

@@ -25,6 +25,22 @@ import (
"github.com/minio/pkg/env"
)
// ProviderConfig - OpenID IDP Configuration for console.
type ProviderConfig struct {
URL string
DisplayName string // user-provided - can be empty
ClientID, ClientSecret string
HMACSalt, HMACPassphrase string
Scopes string
Userinfo bool
RedirectCallbackDynamic bool
RedirectCallback string
}
type OpenIDPCfg map[string]ProviderConfig
var DefaultIDPConfig = "_"
func GetSTSEndpoint() string {
return strings.TrimSpace(env.Get(ConsoleMinIOServer, "http://localhost:9000"))
}