Meilisearch PHP | Documentation

TenantToken extends Endpoint
in package

Table of Contents

Constants

PATH  = ''

Properties

$apiKey  : string|null
$http  : Http

Methods

__construct()  : mixed
generateTenantToken()  : string
Generate a new tenant token.
show()  : array<string|int, mixed>|null
base64url_encode()  : string
validateTenantTokenArguments()  : void

Constants

Properties

Methods

__construct()

public __construct(Http $http[, string|null $apiKey = null ]) : mixed
Parameters
$http : Http
$apiKey : string|null = null

generateTenantToken()

Generate a new tenant token.

public generateTenantToken(string $uid, mixed $searchRules[, DateTimeInterface} $options = [] ]) : string

The $options parameter is an array, and the following keys are accepted:

  • apiKey: The API key parent of the token. If you leave it empty the client API Key will be used.
  • expiresAt: A DateTime when the key will expire. Note that if an expiresAt value is included it should be in UTC time.
Parameters
$uid : string
$searchRules : mixed
$options : DateTimeInterface} = []
Return values
string

show()

public show() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

base64url_encode()

private base64url_encode(string $data) : string
Parameters
$data : string
Return values
string

validateTenantTokenArguments()

private validateTenantTokenArguments(mixed $searchRules[, DateTimeInterface} $options = [] ]) : void
Parameters
$searchRules : mixed
$options : DateTimeInterface} = []

        
On this page

Search results