Skip to main content

NATS Authentication

Client system needs to implement the NATS authentication for subscribing to NATS server:

  • Configure seed while connecting to NDI NATS Server. Refer to this document for more details.
  • Seed should be treated like a secret.

Sample code (For NodeJS):

const seed = new TextEncoder().encode(
"SUAPXY7TJFUFE3IX3OEMSLE3JFZJ3FZZRSRSOGSG2ANDIFN77O2MIBHWUM",
);

const nc = await connect({
port: ns.port,
authenticator: nkeyAuthenticator(seed),
});