mirror of
https://github.com/minio/minio.git
synced 2025-03-25 06:54:14 -04:00
Optimization: reuse hashedSecret when LookupConfig (#19724)
This commit is contained in:
parent
074d70112d
commit
01bfc78535
@ -509,13 +509,11 @@ func (r *Config) GetSettings() madmin.OpenIDSettings {
|
||||
return res
|
||||
}
|
||||
h := sha256.New()
|
||||
hashedSecret := ""
|
||||
for arn, provCfg := range r.arnProviderCfgsMap {
|
||||
hashedSecret := ""
|
||||
{
|
||||
h.Reset()
|
||||
h.Write([]byte(provCfg.ClientSecret))
|
||||
hashedSecret = base64.RawURLEncoding.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
h.Write([]byte(provCfg.ClientSecret))
|
||||
hashedSecret = base64.RawURLEncoding.EncodeToString(h.Sum(nil))
|
||||
h.Reset()
|
||||
if arn != DummyRoleARN {
|
||||
if res.Roles == nil {
|
||||
res.Roles = make(map[string]madmin.OpenIDProviderSettings)
|
||||
|
Loading…
x
Reference in New Issue
Block a user