Skip to content

Commit

Permalink
Merge pull request #9525 from kaltura/Propus-16.5.0-PLAT-10970
Browse files Browse the repository at this point in the history
PLAT-10970: change kaltura auth time to expiry time and not current time
  • Loading branch information
inbal-ben-david committed Jun 23, 2020
2 parents ec23df1 + f1f5f40 commit 45a1633
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alpha/lib/model/FileSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class FileSync extends BaseFileSync implements IBaseObject
const FILE_SYNC_STATUS_DELETED = 3;
const FILE_SYNC_STATUS_PURGED = 4;

const ONE_DAY = 86400;

private $statusMap = array (
self::FILE_SYNC_STATUS_ERROR => "Error",
self::FILE_SYNC_STATUS_PENDING => "Pending",
Expand Down Expand Up @@ -327,7 +329,7 @@ public function getExternalUrl($entryId, $format = PlaybackProtocol::HTTP)
protected function addKalturaAuthParams($url)
{
$version = kNetworkUtils::DEFAULT_AUTH_HEADER_VERSION;
$timestamp = time();
$timestamp = time() + self::ONE_DAY;
$signature = kNetworkUtils::calculateSignature($version, $timestamp, $url);

return '?kaltura_auth=' . $version . ',' . $timestamp . ',' . $signature;
Expand Down

0 comments on commit 45a1633

Please sign in to comment.