@types/sc-auth
TypeScript icon, indicating that this package has built-in type declarations

5.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sc-auth

Weekly Downloads

719

Version

5.0.3

License

MIT

Unpacked Size

3.97 kB

Total Files

5

Last publish

Collaborators

  • types