| [ Index ] |
PHP Cross Reference of Phabricator |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 346 lines (10 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Services_Twilio_Capability:: (6 methods):
__construct()
allowClientIncoming()
allowClientOutgoing()
allowEventStream()
generateToken()
allow()
ScopeURI:: (3 methods):
__construct()
toString()
parse()
JWT:: (8 methods):
decode()
encode()
sign()
jsonDecode()
jsonEncode()
urlsafeB64Decode()
urlsafeB64Encode()
handleJsonError()
Class: Services_Twilio_Capability - X-Ref
Twilio Capability Token generator| __construct($accountSid, $authToken) X-Ref |
| Create a new TwilioCapability with zero permissions. Next steps are to grant access to resources by configuring this token through the functions allowXXXX. param: $accountSid the account sid to which this token is granted access param: $authToken the secret key used to sign the token. Note, this auth |
| allowClientIncoming($clientName) X-Ref |
| If the user of this token should be allowed to accept incoming connections then configure the TwilioCapability through this method and specify the client name. param: $clientName |
| allowClientOutgoing($appSid, array $appParams=array() X-Ref |
| Allow the user of this token to make outgoing connections. param: $appSid the application to which this token grants access param: $appParams signed parameters that the user of this token cannot |
| allowEventStream(array $filters=array() X-Ref |
| Allow the user of this token to access their event stream. param: $filters key/value filters to apply to the event stream |
| generateToken($ttl = 3600) X-Ref |
| Generates a new token based on the credentials and permissions that previously has been granted to this token. param: $ttl the expiration time of the token (in seconds). Default return: the newly generated token that is valid for $ttl seconds |
| allow($service, $privilege, $params) X-Ref |
| No description |
| __construct($service, $privilege, $params = array() X-Ref |
| No description |
| toString() X-Ref |
| No description |
| parse($uri) X-Ref |
| Parse a scope URI into a ScopeURI object param: string $uri The scope URI return: ScopeURI The parsed scope uri |
| decode($jwt, $key = null, $verify = true) X-Ref |
param: string $jwt The JWT param: string|null $key The secret key param: bool $verify Don't skip verification process return: object The JWT's payload as a PHP object |
| encode($payload, $key, $algo = 'HS256') X-Ref |
param: object|array $payload PHP object or array param: string $key The secret key param: string $algo The signing algorithm return: string A JWT |
| sign($msg, $key, $method = 'HS256') X-Ref |
param: string $msg The message to sign param: string $key The secret key param: string $method The signing algorithm return: string An encrypted message |
| jsonDecode($input) X-Ref |
param: string $input JSON string return: object Object representation of JSON string |
| jsonEncode($input) X-Ref |
param: object|array $input A PHP object or array return: string JSON representation of the PHP object or array |
| urlsafeB64Decode($input) X-Ref |
param: string $input A base64 encoded string return: string A decoded string |
| urlsafeB64Encode($input) X-Ref |
param: string $input Anything really return: string The base64 encode of what you passed in |
| handleJsonError($errno) X-Ref |
param: int $errno An error number from json_last_error() return: void |
| Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |