confluentinc / confluent-kafka-go

Confluent's Apache Kafka Golang client
Apache License 2.0
4.67k stars 660 forks source link

NewConfigWithBearerAuthentication BearerAuthCredentialsSource using STATIC_TOKEN, after token expire, schema registry not work #1302

Open xyz5881 opened 2 months ago

xyz5881 commented 2 months ago

Description

How to reproduce

Using oauthClientId and oauthSecretId to generate the oauthToken and pass the value to NewConfigWithBearerAuthentication, then set up the schemaRegistryClient. After the oauthToken is expired, the schemaRegistryClient also expired. Hope there is a way to pass in clientid and secret, or it's hard to refresh schemaRegistry every time when we get a new token - since it's set as STATIC_TOKEN

Checklist

Please provide the following information: