mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix loading config from openid config_url (#8503)
This commit is contained in:
parent
822eb5ddc7
commit
4082764d48
@ -282,6 +282,13 @@ func LookupConfig(kv config.KVS, transport *http.Transport, closeRespFn func(io.
|
||||
jwksURL = env.Get(EnvIdentityOpenIDJWKSURL, kv.Get(JwksURL))
|
||||
}
|
||||
|
||||
c = Config{
|
||||
ClaimPrefix: env.Get(EnvIdentityOpenIDClaimPrefix, kv.Get(ClaimPrefix)),
|
||||
publicKeys: make(map[string]crypto.PublicKey),
|
||||
transport: transport,
|
||||
closeRespFn: closeRespFn,
|
||||
}
|
||||
|
||||
configURL := env.Get(EnvIdentityOpenIDURL, kv.Get(ConfigURL))
|
||||
if configURL != "" {
|
||||
c.URL, err = xnet.ParseHTTPURL(configURL)
|
||||
@ -308,13 +315,6 @@ func LookupConfig(kv config.KVS, transport *http.Transport, closeRespFn func(io.
|
||||
return c, nil
|
||||
}
|
||||
|
||||
c = Config{
|
||||
ClaimPrefix: env.Get(EnvIdentityOpenIDClaimPrefix, kv.Get(ClaimPrefix)),
|
||||
publicKeys: make(map[string]crypto.PublicKey),
|
||||
transport: transport,
|
||||
closeRespFn: closeRespFn,
|
||||
}
|
||||
|
||||
c.JWKS.URL, err = xnet.ParseHTTPURL(jwksURL)
|
||||
if err != nil {
|
||||
return c, err
|
||||
|
Loading…
Reference in New Issue
Block a user