/
home
/
desid573
/
public_html
/
eway
/
pdd
/
app
/
Vendor
/
Services
/
Twilio
/
/home/desid573/public_html/eway/pdd/app/Vendor/Services/Twilio
mkdir
upload
Name
Size
Mode
Actions
Auth/
-
0755
rm
Rest/
-
0755
rm
TaskRouter/
-
0755
rm
AccessToken.php
2997
0644
edit
dl
rm
AutoPagingIterator.php
2834
0644
edit
dl
rm
Capability.php
5409
0644
edit
dl
rm
HttpException.php
68
0644
edit
dl
rm
HttpStream.php
3015
0644
edit
dl
rm
InstanceResource.php
2796
0644
edit
dl
rm
IPMessagingInstanceResource.php
487
0644
edit
dl
rm
IPMessagingListResource.php
639
0644
edit
dl
rm
JWT.php
5275
0644
edit
dl
rm
ListResource.php
6227
0644
edit
dl
rm
LookupsInstanceResource.php
479
0644
edit
dl
rm
LookupsListResource.php
1275
0644
edit
dl
rm
MonitorInstanceResource.php
479
0644
edit
dl
rm
MonitorListResource.php
631
0644
edit
dl
rm
NextGenInstanceResource.php
690
0644
edit
dl
rm
NextGenListResource.php
1810
0644
edit
dl
rm
NumberType.php
1076
0644
edit
dl
rm
Page.php
1414
0644
edit
dl
rm
PartialApplicationHelper.php
1067
0644
edit
dl
rm
PricingInstanceResource.php
477
0644
edit
dl
rm
PricingListResource.php
395
0644
edit
dl
rm
RequestValidator.php
1714
0644
edit
dl
rm
Resource.php
3697
0644
edit
dl
rm
RestException.php
1092
0644
edit
dl
rm
SIPListResource.php
386
0644
edit
dl
rm
TaskRouterInstanceResource.php
725
0644
edit
dl
rm
TaskRouterListResource.php
878
0644
edit
dl
rm
TimeRangeResource.php
1146
0644
edit
dl
rm
TinyHttp.php
4582
0644
edit
dl
rm
TrunkingInstanceResource.php
481
0644
edit
dl
rm
TrunkingListResource.php
1160
0644
edit
dl
rm
Twiml.php
4373
0644
edit
dl
rm
UsageResource.php
661
0644
edit
dl
rm
WorkflowConfiguration.php
2539
0644
edit
dl
rm
Edit:
/home/desid573/public_html/eway/pdd/app/Vendor/Services/Twilio/AccessToken.php
(2997B)
<?php include_once 'JWT.php'; class Services_Twilio_AccessToken { private $signingKeySid; private $accountSid; private $secret; private $ttl; private $identity; private $nbf; private $grants; public function __construct($accountSid, $signingKeySid, $secret, $ttl = 3600, $identity = null) { $this->signingKeySid = $signingKeySid; $this->accountSid = $accountSid; $this->secret = $secret; $this->ttl = $ttl; if (!is_null($identity)) { $this->identity = $identity; } $this->grants = array(); } /** * Set the identity of this access token * * @param string $identity identity of the grant * * @return Services_Twilio_AccessToken updated access token */ public function setIdentity($identity) { $this->identity = $identity; return $this; } /** * Returns the identity of the grant * * @return string the identity */ public function getIdentity() { return $this->identity; } /** * Set the nbf of this access token * * @param integer $nbf nbf in epoch seconds of the grant * * @return Services_Twilio_AccessToken updated access token */ public function setNbf($nbf) { $this->nbf = $nbf; return $this; } /** * Returns the nbf of the grant * * @return integer the nbf in epoch seconds */ public function getNbf() { return $this->nbf; } /** * Add a grant to the access token * * @param Services_Twilio_Auth_Grant $grant to be added * * @return $this the updated access token */ public function addGrant(Services_Twilio_Auth_Grant $grant) { $this->grants[] = $grant; return $this; } public function toJWT($algorithm = 'HS256') { $header = array( 'cty' => 'twilio-fpa;v=1', 'typ' => 'JWT' ); $now = time(); $grants = array(); if ($this->identity) { $grants['identity'] = $this->identity; } foreach ($this->grants as $grant) { $payload = $grant->getPayload(); if (empty($payload)) { $payload = json_decode('{}'); } $grants[$grant->getGrantKey()] = $payload; } if (empty($grants)) { $grants = json_decode('{}'); } $payload = array( 'jti' => $this->signingKeySid . '-' . $now, 'iss' => $this->signingKeySid, 'sub' => $this->accountSid, 'exp' => $now + $this->ttl, 'grants' => $grants ); if (!is_null($this->nbf)) { $payload['nbf'] = $this->nbf; } return JWT::encode($payload, $this->secret, $algorithm, $header); } public function __toString() { return $this->toJWT(); } }
Save
cmd:
run