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§

Source§

readonly claims?: {
    audience?: string;
    expiresIn?: number;
    issuer?: string;
    jwtid?: string;
    notBefore?: number;
    subject?: string;
}

Default: {}

Source§

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}

Source§

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

Default: "sign"

Source§

readonly options?: {
    algorithm?:
        | "HS256"
        | "HS384"
        | "HS512"
        | "RS256"
        | "RS384"
        | "RS512"
        | "ES256"
        | "ES384"
        | "ES512"
        | "PS256"
        | "PS384"
        | "PS512";
    clockTolerance?: number;
    complete?: boolean;
    ignoreExpiration?: boolean;
    ignoreNotBefore?: boolean;
    kid?: string;
}

Default: {}

Source§

readonly token?: string

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

Source§

readonly useJson?: boolean

Whether to use JSON to build the claims