Meilisearch JS / index / TenantTokenGeneratorOptions
Type Alias: TenantTokenGeneratorOptions
TenantTokenGeneratorOptions =
object
Defined in: src/types/token.ts:17
Options object for tenant token generation.
Properties
algorithm?
optionalalgorithm?: `HS${256 | 384 | 512}`
Defined in: src/types/token.ts:46
Encryption algorithm used to sign the JWT. Supported values by Meilisearch are HS256, HS384, HS512. (HS[number] means HMAC using SHA-[number])
Default Value
"HS256"
See
https://www.meilisearch.com/docs/learn/security/generate_tenant_token_scratch#prepare-token-header
apiKey
apiKey:
string
Defined in: src/types/token.ts:19
API key used to sign the token.
apiKeyUid
apiKeyUid:
string
Defined in: src/types/token.ts:25
The uid of the api key used as issuer of the token.
See
https://www.meilisearch.com/docs/learn/security/tenant_token_reference#api-key-uid
expiresAt?
optionalexpiresAt?:number|Date
Defined in: src/types/token.ts:38
UNIX timestamp or Date object at which the token expires.
See
https://www.meilisearch.com/docs/learn/security/tenant_token_reference#expiry-date
force?
optionalforce?:boolean
Defined in: src/types/token.ts:55
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).
Default Value
false
searchRules?
optionalsearchRules?:TokenSearchRules
Defined in: src/types/token.ts:31
Search rules that are applied to every search.
Default Value
["*"]