Skip to content

Commit

Permalink
Update security-basic-auth.md
Browse files Browse the repository at this point in the history
Add mode code for HTTP basic authn

Related to PR : apache/pulsar-client-node#391
  • Loading branch information
raymondBourges authored Aug 19, 2024
1 parent b17a531 commit 87fc1bd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions versioned_docs/version-3.3.x/security-basic-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,26 @@ To configure basic authentication when using Pulsar clients, you can follow the
client = Client("pulsar://broker.example.com:6650", authentication=AuthenticationBasic("admin", "123456"))
```
</TabItem>
<TabItem value="Node.js">
```javascript
const Pulsar = require('pulsar-client');
(async () => {
const auth = new Pulsar.AuthenticationBasic({
username: 'admin',
password: '123456',
});
const client = new Pulsar.Client({
serviceUrl: 'pulsar+ssl://broker.example.com:6651/',
authentication: auth
});
})();
```
</TabItem>
<TabItem value="Go">
Expand Down

0 comments on commit 87fc1bd

Please sign in to comment.