You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: meilisearch/client.py
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -472,7 +472,7 @@ def wait_for_task(
472
472
defgenerate_tenant_token(
473
473
self,
474
474
search_rules: Dict[str, Any],
475
-
expired_at: Optional[float] =None,
475
+
expires_at: Optional[int] =None,
476
476
api_key: Optional[str] =None
477
477
) ->str:
478
478
"""Generate a JWT token for the use of multitenancy.
@@ -483,21 +483,18 @@ def generate_tenant_token(
483
483
A Dictionary or an object which contains the rules to be enforced at search time for all or specific
484
484
accessible indexes for the signing API Key.
485
485
In the specific case of you want to have any restrictions you can also use a array ["*"].
486
-
expired_at (optional):
486
+
expires_at (optional):
487
487
Date and time when the key will expire.
488
-
Note that if an expired_at value is included it should a `timestamp`.
488
+
Note that if an expires_at value is included it should a `timestamp`.
489
489
api_key (optional):
490
490
The API key parent of the token. If you let it empty the client API Key will be used.
491
491
492
492
Returns
493
493
-------
494
494
jwt_token:
495
495
A string containing the jwt tenant token.
496
-
497
-
Raises
498
-
------
499
-
MeiliSearchApiError
500
-
An error containing details about why Meilisearch can't process your request. Meilisearch error codes are described here: https://docs.meilisearch.com/errors/#meilisearch-errors
496
+
Note: If your token does not work remember that the searchrules is madatory and should be well formatted.
497
+
`exp` must be a timestamp in the future.
501
498
"""
502
499
# Standard JWT header for encryption with SHA256/HS256 algorithm
0 commit comments