Meilisearch JS
    Preparing search index...

    Type Alias TenantTokenGeneratorOptions

    Options object for tenant token generation.

    type TenantTokenGeneratorOptions = {
        algorithm?: `HS${256 | 384 | 512}`;
        apiKey: string;
        apiKeyUid: string;
        expiresAt?: number | Date;
        force?: boolean;
        searchRules?: TokenSearchRules;
    }
    Index

    Properties

    algorithm?: `HS${256 | 384 | 512}`

    Encryption algorithm used to sign the JWT. Supported values by Meilisearch are HS256, HS384, HS512. (HS[number] means HMAC using SHA-[number])

    apiKey: string

    API key used to sign the token.

    apiKeyUid: string

    The uid of the api key used as issuer of the token.

    expiresAt?: number | Date

    UNIX timestamp or Date object at which the token expires.

    force?: boolean

    By default if a non-safe environment is detected, an error is thrown. Setting this to true skips environment detection. This is intended for server-side environments where detection fails or usage in a browser is intentional (Use at your own risk).

    false

    searchRules?: TokenSearchRules

    Search rules that are applied to every search.

    ["*"]