Skip to content

Commit

Permalink
app/config: remove redundant OIDC config load
Browse files Browse the repository at this point in the history
The OIDC configuration is unmarshaled by viper from the config.yaml
file, so this isn't required
  • Loading branch information
joelrebel committed Jul 25, 2024
1 parent 9583ad5 commit 11673db
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions internal/app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ func (a *App) envVarOverrides() error {
return err
}

if err := a.apiServerJWTAuthParams(); err != nil {
return errors.Wrap(ErrConfig, err.Error())
}

return nil
}

Expand All @@ -167,21 +163,6 @@ var (
defaultNatsConnectTimeout = 100 * time.Millisecond
)

func (a *App) apiServerJWTAuthParams() error {
if !a.v.GetBool("oidc.enabled") {
return nil
}

cfgs, err := ginjwt.GetAuthConfigsFromFlags(a.v)
if err != nil {
return err
}
a.Logger.WithField("config.length", len(cfgs)).Debug("oidc configurations found")
a.Config.APIServerJWTAuth = cfgs

return nil
}

// nolint:gocyclo // nats env config load is cyclomatic
func (a *App) envVarNatsOverrides() error {
if a.v.GetString("nats.url") != "" {
Expand Down

0 comments on commit 11673db

Please sign in to comment.