Twilio capability token generator
author | Aleksey Korzun |
---|---|
package | Library |
subpackage | Twilio\Utility |
__construct(string $identifier, string $token)
Next steps are to grant access to resources by configuring this token through the functions allowXXXX.
string
the account secure identifier to which this token is granted access
string
the secret key used to sign the token.
allowClientIncoming(string $name)
allowClientOutgoing(int $applicationSid, array $parameters)
int
the application to which this token grants access
string[]
signed parameters that the user of this token cannot overwrite.
allowEventStream(array $filters)
array
key/value filters to apply to the event stream
generateToken(int $ttl) : string
int
the expiration time of the token (in seconds).
string
the newly generated token that is valid for specified
number of secondsallow(string $service, string $privilege, string[] $parameters)
string
string
string[]
$clientName : string
$identifier : string
$scopes : string[]
$token : string
DEFAULT_TTL : int