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.TicketAuthProvider 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 / resumeToken.ts View on Github external
const signature: Signature = {
    signature: 'admin',
    details: {
      'generate-token': true,
    },
  };

  return Promise.resolve(signature);
};

const connection = new Connection({
  endpoint: 'ws://localhost:8001',
  serializer: new JSONSerializer(),
  transport: NodeWebSocketTransport,
  transportOptions: {},
  authProvider: new TicketAuthProvider('admin', tokenFunc),

  logFunction: console.log as any,
  realm: 'slimerp',
});

connection.Open().then(async (welcomeDict: WelcomeDetails) => {
  console.log(welcomeDict.authextra && welcomeDict.authextra['resume-token']);
});