edgeport - v1.0.6
    Preparing search index...

    Interface ScramClient

    A SCRAM client state machine, produced by scramClient.

    Drive it in three steps: send ScramClient.clientFirst, feed the server's first message to ScramClient.handleServerFirst and send what it returns, then check the server's final message with ScramClient.verifyServerFinal. The XMPP module base64-wraps each string.

    1.0.4

    interface ScramClient {
        clientFirst: string;
        clientFirstBare: string;
        clientNonce: string;
        mechanism: ScramMechanism;
        handleServerFirst(serverFirst: string): Promise<string>;
        verifyServerFinal(serverFinal: string): Promise<void>;
    }
    Index
    clientFirst: string

    The client-first message (n,,n=user,r=nonce) sent in <auth>.

    clientFirstBare: string

    The client-first-bare portion (n=user,r=nonce), used to build the auth message.

    clientNonce: string

    The client nonce this exchange was seeded with.

    mechanism: ScramMechanism

    The negotiated mechanism.

    • Processes the server-first message and returns the client-final message (with proof).

      Parameters

      • serverFirst: string

        The decoded server-first message (r=..,s=..,i=..).

      Returns Promise<string>

      The client-final message (c=biws,r=..,p=..).

      If the server nonce does not extend the client nonce, or the message is malformed.

    • Verifies the server-final message's signature (v=..).

      Parameters

      • serverFinal: string

        The decoded server-final message.

      Returns Promise<void>

      If the server reported an error or its signature does not match.