apache / pulsar-client-node

Apache Pulsar NodeJS Client
https://pulsar.apache.org/
Apache License 2.0
148 stars 86 forks source link

[improve][client] Adding support for token supplier for the AuthenticationToken #395

Closed Bouk250 closed 1 month ago

Bouk250 commented 2 months ago

Master Issue: #396

Motivation

The AuthenticationToken only supports static token, limiting us to use token without expiration. So the integration with existing authentication returns tokens with expiration becomes not possible.

Modifications

Added the necessary cpp code for support token supplier as a js callback returns string tokens.

Modified file:

This change added tests and can be verified as follows:

Documentation

Bouk250 commented 2 months ago

@shibd Hi :), I fixed the issue with the test, I forget to release the callback. Now it will work.