edgeport - v1.0.6
    Preparing search index...

    Function scramClient

    • Creates a ScramClient for a mechanism, username, and password.

      Parameters

      • mechanism: ScramMechanism

        'SCRAM-SHA-1' or 'SCRAM-SHA-256'.

      • username: string

        The authentication identity (SCRAM saslname-escaped internally).

      • password: string

        The account password.

      • Optionalopts: { nonce?: string }

        Optional fixed client nonce (for reproducible tests); random otherwise.

      Returns ScramClient

      The client state machine.

      1.0.4

      import { scramClient } from 'edgeport/xmpp';

      const c = scramClient('SCRAM-SHA-256', 'user', 'pencil');
      const clientFinal = await c.handleServerFirst(serverFirst);
      await c.verifyServerFinal(serverFinal);