From 9421ee305f26c969055aea6769f6b114accd5519 Mon Sep 17 00:00:00 2001 From: Russel Vela Date: Wed, 13 Mar 2024 12:19:50 -0600 Subject: [PATCH] feat(svc-account-auth): Normalizes token type comparison --- pkg/venafi/cloud/connector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/venafi/cloud/connector.go b/pkg/venafi/cloud/connector.go index df7d9962..f9818d2b 100644 --- a/pkg/venafi/cloud/connector.go +++ b/pkg/venafi/cloud/connector.go @@ -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)