Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function credsAuthenticator
import { credsAuthenticator } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";

Returns an Authenticator function that returns a JwtAuth. This is a convenience Authenticator that parses the specified creds and delegates to the jwtAuthenticator.

Parameters

creds: Uint8Array | (() => Uint8Array)
  • the contents of a creds file or a function that returns the creds