Skip to content

Commit 02b0f47

Browse files
committed
Fix: Send audience as a single string in the JWT
Signed-off-by: Albert Callarisa <[email protected]>
1 parent 2390f7a commit 02b0f47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common/component/kafka/sasl_oauthbearer_private_key_jwt.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ func (ts *OAuthTokenSourcePrivateKeyJWT) Token() (*sarama.AccessToken, error) {
169169
return nil, fmt.Errorf("failed to build token: %w", err)
170170
}
171171

172+
// Some IdPs require the audience to be set as a single string
173+
token.Options().Enable(jwt.FlattenAudience)
174+
172175
var signOptions []jwt.Option
173176
if ts.Kid != "" {
174177
headers := jws.NewHeaders()

0 commit comments

Comments
 (0)