Skip to content

Commit

Permalink
rename cert to certificate (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonTal authored Aug 17, 2021
1 parent dd609a0 commit f5d4368
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (lc *Cmd) Run() error {
IssuerURL: info.TokenIssuerURL,
TokenBasicAuth: info.TokenBasicAuth,
SSLDisabled: lc.sslDisabled,
Cert: lc.cert,
Certificate: lc.cert,
Key: lc.key,
}

Expand Down
4 changes: 2 additions & 2 deletions internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func BuildHTTPClient(options *auth.Options) (*http.Client, error) {
client := getClient()

if MtlsEnabled(options) {
cert, err := tls.LoadX509KeyPair(options.Cert, options.Key)
cert, err := tls.LoadX509KeyPair(options.Certificate, options.Key)
if err != nil {
return nil, err
}
Expand All @@ -70,7 +70,7 @@ func BuildHTTPClient(options *auth.Options) (*http.Client, error) {
}

func MtlsEnabled(options *auth.Options) bool {
return len(options.Cert) > 0 && len(options.Key) > 0
return len(options.Certificate) > 0 && len(options.Key) > 0
}

func getClient() *http.Client {
Expand Down
2 changes: 1 addition & 1 deletion pkg/auth/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Options struct {
Password string
ClientID string `mapstructure:"client_id"`
ClientSecret string `mapstructure:"client_secret"`
Cert string `mapstructure:"cert"`
Certificate string `mapstructure:"cert"`
Key string `mapstructure:"key"`
AuthorizationEndpoint string `mapstructure:"authorization_endpoint"`
TokenEndpoint string `mapstructure:"token_endpoint"`
Expand Down

0 comments on commit f5d4368

Please sign in to comment.