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:
committed by
GitHub
parent
abb668633b
commit
118cf97e1d
@@ -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"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user