Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

OAuth bearer authentication example using Red Hat OpenShift Streams for Apache Kafka and KafkaJS

License

Notifications You must be signed in to change notification settings

nodeshift-archived/kfk-token-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kfk-token-example

oauthbearer authentication example using Red Hat OpenShift Streams for Apache Kafka and KafkaJS

  1. Go to Get started with Red Hat OpenShift Streams for Apache Kafka

  2. Create kafka instance

  3. Create a topic called test-topic (or change the topic name in the source code)

  4. Save each required the information for the following constants:

const CLIENT_ID = '';

const CLIENT_SECRET = '';

const TOKEN_ENDPOINT_URL = '';

const BOOTSTRAP_SERVER = '';
  1. Run the code
npm i
node main.js

logLevel: logLevel.DEBUG

...
{"level":"DEBUG","timestamp":"2021-06-18T00:53:55.991Z","logger":"kafkajs","message":"[SASLOAuthBearerAuthenticator] SASL OAUTHBEARER authentication successful",
...

About

OAuth bearer authentication example using Red Hat OpenShift Streams for Apache Kafka and KafkaJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published