npm.io
5.0.3 • Published 2 years ago

@types/sc-auth

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

Installation

npm install --save @types/sc-auth

Summary

This package contains type definitions for sc-auth (https://github.com/SocketCluster/sc-auth).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sc-auth.

index.d.ts

import { Secret, SignCallback, SignOptions, VerifyCallback, VerifyOptions } from "jsonwebtoken";

export interface SCAuthEngine {
    verifyToken(signedToken: string, key: string | Buffer, options?: VerifyOptions, callback?: VerifyCallback): void;
    signToken(token: string | object | Buffer, key: Secret, options?: SignOptions, callback?: SignCallback): void;
}

export class AuthEngine implements SCAuthEngine {
    constructor();

    verifyToken(signedToken: string, key: string | Buffer, options?: VerifyOptions, callback?: VerifyCallback): void;
    signToken(token: string | object | Buffer, key: Secret, options?: SignOptions, callback?: SignCallback): void;
}

Additional Details

Credits

These definitions were written by Daniel Rose.