<?php

include './common.php';
use Ministra\Lib\Itv;
if (empty($_GET['token'])) {
    \header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
    exit;
}
$uid = \Ministra\Lib\Itv::checkTemporaryLink($_GET['token']);
if (!$uid) {
    \header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
} else {
    \header('X-AuthDuration: 36000');
    \header('X-Unique: true');
    \header('X-Max-Sessions: ' . \Ministra\Lib\w13ec15f0067ea75861e61e27c990e4ba\k8281faec2a4a41f470b00112682ddabf::getSafe('max_local_recordings', 10));
    \header('X-UserId: ' . $uid);
    \header($_SERVER['SERVER_PROTOCOL'] . ' 200 OK');
}
