We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the @verkehrsministerium/kraftfahrstrasse.TLSAuthProvider function in @verkehrsministerium/kraftfahrstrasse

To help you get started, we’ve selected a few @verkehrsministerium/kraftfahrstrasse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github verkehrsministerium / kraftfahrstrasse / example / tlsClientAuthentication.ts View on Github external
TLSAuthProvider,
} from '@verkehrsministerium/kraftfahrstrasse';

import { readFileSync } from "fs";

const connection = new Connection({
  endpoint: 'wss://localhost:8000',
  serializer: new JSONSerializer(),
  transport: NodeWebSocketTransport,
  transportOptions: {
    ca: readFileSync('certs/ca.crt'),
    cert: readFileSync('certs/cert.crt'),
    key: readFileSync('certs/cert.key'),
    rejectUnauthorized: false,
  },
  authProvider: new TLSAuthProvider(),
  logFunction: console.log as any,
  realm: 'slimerp',
});

connection.Open().then(() => {
  console.log("Conncetion open.");
});