npm.io
0.2.5 • Published 2 years ago

@types/jwt-client

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

Installation

npm install --save @types/jwt-client

Summary

This package contains type definitions for jwt-client (https://github.com/pauldijou/jwt-client).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jwt-client.

index.d.ts

declare module "jwt-client" {
    interface JWTHeader {
        typ: string;
        alg: string;
    }

    interface JWTObject {
        header: JWTHeader;
        claim: any;
        signature: string;
    }

    /**
     * Read a string value (normally an HTTP header)
     * from JSON Web Token to an Object
     */
    function read(header: string): JWTObject;

    /**
     * Given a JWT object, stringify it back to
     * its JWT representation.
     */
    function write(value: JWTObject): string;

    function keep(value: JWTObject, key?: any, storate?: any): void;

    function remember(): void;

    function forget(): void;

    function get(): string;

    function validate(value: JWTObject, issuer?: any, audience?: any): boolean;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: none

Credits

These definitions were written by Timoteo Ponce.