Skip to content

Commit

Permalink
Update provider.go
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcorrigan714 authored Apr 14, 2023
1 parent cbc4fc0 commit 3591ba4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion azuredevops/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,11 @@ func GetAuthToken(ctx context.Context, d *schema.ResourceData, azIdentityFuncs A
if len(jwtParts) != 3 {
return "", errors.New("Unable to split TFC_WORKLOAD_IDENTITY_TOKEN jwt")
}
tokenClaims, err := base64.StdEncoding.DecodeString(jwtParts[1])
jwtClaims := jwtParts[1]
if i := len(jwtClaims) % 4; i != 0 {
jwtClaims += strings.Repeat("=", 4-i)
}
tokenClaims, err := base64.StdEncoding.DecodeString(jwtClaims)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 3591ba4

Please sign in to comment.