Skip to content

Commit

Permalink
feat(svc-account-auth): Normalizes token type comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rvelaVenafi committed Mar 13, 2024
1 parent b6391d7 commit 9421ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/venafi/cloud/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ func (c *Connector) getServiceAccountToken() error {
if err != nil {
return err
}
if strings.ToLower(accessTokenResponse.TokenType) != oauthTokenType {
if strings.ToLower(accessTokenResponse.TokenType) != strings.ToLower(oauthTokenType) {
return fmt.Errorf(
"%w: got an access token but token type is not %s. Expected: %s. Got: %s", verror.ServerError,
oauthTokenType, oauthTokenType, accessTokenResponse.TokenType)
Expand Down

0 comments on commit 9421ee3

Please sign in to comment.