Skip to content

Commit

Permalink
feat: allow settings client with oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
tomazpu committed Nov 22, 2024
1 parent 3ca846a commit fe468f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions cmd/monaco/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ func validateAuthenticationWithProjectConfigs(projects []project.Project, enviro
}

switch conf.Type.(type) {
case config.ClassicApiType,
config.SettingsType:
case config.ClassicApiType:
if environments[envName].Auth.Token == nil {
return fmt.Errorf("API of type '%s' requires a token for environment '%s'", conf.Type, envName)
}
Expand Down
3 changes: 0 additions & 3 deletions cmd/monaco/download/download_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,6 @@ func downloadConfigs(clientSet *client.ClientSet, apisToDownload api.APIs, opts
}

if shouldDownloadSettings(opts) {
if opts.auth.Token == nil {
return nil, errors.New("settings client config requires token")
}
log.Info("Downloading settings objects")
settingCfgs, err := fn.settingsDownload(clientSet.Settings(), opts.projectName, settings.DefaultSettingsFilters, makeSettingTypes(opts.specificSchemas)...)
if err != nil {
Expand Down

0 comments on commit fe468f0

Please sign in to comment.