npm.io
1.2.4 • Published 2 years ago

@types/sasl-scram-sha-1

Licence
MIT
Version
1.2.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/sasl-scram-sha-1

Summary

This package contains type definitions for sasl-scram-sha-1 (https://github.com/legastero/js-sasl-scram-sha-1).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sasl-scram-sha-1.

index.d.ts

import { Mechanism } from "saslmechanisms";

export = ScramSha1Mechanism;

declare class ScramSha1Mechanism implements Mechanism {
    static Mechanism: typeof ScramSha1Mechanism;
    static prototype: {
        name: "SCRAM-SHA-1";
        clientFirst: true;
    };

    name: "SCRAM-SHA-1";
    clientFirst: true;

    constructor(options?: ScramSha1Mechanism.Options);

    response(cred: ScramSha1Mechanism.Credentials): string;

    challenge(chal: string): this;
}

declare namespace ScramSha1Mechanism {
    interface Options {
        genNonce?: (() => number) | undefined;
    }

    interface Credentials {
        authzid?: string | undefined;
        username?: string | undefined;
        password?: string | undefined;
        salt?: string | undefined;
        saltedPassword?: string | undefined;
        clientKey?: string | undefined;
        serverKey?: string | undefined;
    }
}

Additional Details

Credits

These definitions were written by BendingBender.