Skip to content

Commit

Permalink
chore!: move global secret to config
Browse files Browse the repository at this point in the history
  • Loading branch information
invakid404 committed Aug 10, 2024
1 parent f2625a1 commit 80a979d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Config struct {
Port int `koanf:"port"`
BaseURL string `koanf:"base_url" validate:"required"`
EnableK8S bool `koanf:"enable_k8s"`
GlobalSecret string `koanf:"global_secret" validate:"required"`
OAuthClients map[string]OAuthClient `koanf:"clients"`
}

Expand Down
3 changes: 1 addition & 2 deletions oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ func New(cfg *config.Config) *OAuth {
PARSessions: map[string]fosite.AuthorizeRequester{},
}

// TODO: move these to the config
secret := []byte("my super secret signing password")
secret := []byte(cfg.GlobalSecret)

oauthConfig := &fosite.Config{
AccessTokenLifespan: time.Minute * 60,
Expand Down

0 comments on commit 80a979d

Please sign in to comment.