Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLAT-10970: change kaltura auth time to expiry time and not current time #9525

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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