getAccessToken(true); } catch (Exception $e) { $logger->error('Auth0 access token failed: ' . $e->getMessage()); $requestedUrl = $_SERVER['REQUEST_URI'] ?? '/'; $state = base64_encode($requestedUrl); $_SESSION['validState'] = $state; $redirectUrl = '/please_login_v2.php?state=' . $state; header('Location: ' . $redirectUrl); } $zendViewObj = new Zend_View($application->getOptions()); $zendViewObj->setScriptPath(__DIR__ . '/../../../application/modules/oa/views/scripts'); require_once('cssLoader.inc'); ?> <?=$GLOBALS['pageTitle']?> OrchAdmin partial('partials/auth0-jwt-session.phtml', [ 'configs' => yaml_parse(file_get_contents(APPLICATION_PATH . '/configs/auth0.yml')), 'scriptVersion' => '8', 'token' => $token ]); echo $zendViewObj->partial('partials/refresh-csrf-token.phtml'); ?> consumerKey = $trackingCode; $segmentKeyConfigured = false; if (isset($_SESSION['S_USERID'])) { $json->userId = $_SESSION['S_USERID']; $segmentKeyConfigured = SegmentAnalyticsTracking::getKey('oa'); } if ($segmentKeyConfigured) { $jsApps[] = 'segment-analytics'; // segment config $configFile = "application/configs/segment.yml"; for ($i = 0; $i < $slashes; $i++) { $configFile = "../" . $configFile; } try { $segmentConfig = yaml_parse_file($configFile); $segementKey = $segmentConfig['segment']['oa']['key']; } catch (\Exception $e) { $logger->error('Error reading segment config file'); $segementKey = ''; } // setup json for segment-analytics-config $segmentJson = new stdClass(); $segmentJson->key = $segementKey; if (isset($_SESSION['S_USERID'])) { $segmentJson->userId = $_SESSION['S_USERID']; } } ?> getCdnJsPath($file) : '/js/dev/' . $appName . '.js?' . time(); //output the script block ?>