Skip to content

Commit

Permalink
chore: gaf configuration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CatalinSnyk authored and PeterSchafer committed Dec 4, 2024
1 parent af2e008 commit 026f408
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cliv2/cmd/cliv2/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
)

func defaultOAuthFF(config configuration.Configuration) configuration.DefaultValueFunction {
return func(existingValue interface{}) interface{} {
return func(existingValue interface{}) (interface{}, error) {
if _, ok := os.LookupEnv(auth.CONFIG_KEY_OAUTH_TOKEN); ok {
return true
return true, nil
}

keysThatMightDisableOAuth := config.GetAllKeysThatContainValues(configuration.AUTHENTICATION_BEARER_TOKEN)
Expand All @@ -23,10 +23,10 @@ func defaultOAuthFF(config configuration.Configuration) configuration.DefaultVal
for _, key := range keysThatMightDisableOAuth {
keyType := config.GetKeyType(key)
if keyType == configuration.EnvVarKeyType {
return false
return false, nil
}
}

return true
return true, nil
}
}

0 comments on commit 026f408

Please sign in to comment.