Interface JwtNodeParameters

Source
interface JwtNodeParameters {
    claims?: {
        audience?: string;
        expiresIn?: number;
        issuer?: string;
        jwtid?: string;
        notBefore?: number;
        subject?: string;
    };
    claimsJson?: string;
    operation?: "sign"
    | "decode"
    | "verify";
    options?: {
        algorithm?:
            | "HS256"
            | "HS384"
            | "HS512"
            | "RS256"
            | "RS384"
            | "RS512"
            | "ES256"
            | "ES384"
            | "ES512"
            | "PS256"
            | "PS384"
            | "PS512";
        clockTolerance?: number;
        complete?: boolean;
        ignoreExpiration?: boolean;
        ignoreNotBefore?: boolean;
        kid?: string;
    };
    token?: string;
    useJson?: boolean;
}

Properties§

§readonly claims?: { ... }

Default: {}

§readonly claimsJson?: string

Claims to add to the token in JSON format Default: "{\n "my_field_1": "value 1",\n "my_field_2": "value 2"\n}\n" Type options: {"rows":5}

§readonly operation?: "sign" | "decode" | "verify"

Default: "sign"

§readonly options?: { ... }

Default: {}

§readonly token?: string

The token to verify or decode Type options: {"password":true}

§readonly useJson?: boolean

Whether to use JSON to build the claims