mirror of
https://github.com/pgmr3/synologySsoClientExamplePage.git
synced 2025-12-13 13:35:49 +01:00
first commit
This commit is contained in:
37
php/php.php
Normal file
37
php/php.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// ------------------------------------------------------------------------------
|
||||
//
|
||||
// © Copyright (с) 2023 License: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
// Author: https://github.com/pgmr3
|
||||
// ------------------------------------------------------------------------------
|
||||
// additional code for authorization check/automatic logout
|
||||
include_once('../check_accesstoken.php');
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<body>
|
||||
<div id="session-lifetime" >loading...</div>
|
||||
</body>
|
||||
|
||||
<script src="../js/myLoginScript.js" type="text/javascript"></script>
|
||||
<script>
|
||||
|
||||
// Document fully loaded
|
||||
function dokumentLoadDone(event) {
|
||||
<?php
|
||||
//Restart session lifetime
|
||||
if(session_status() !== PHP_SESSION_ACTIVE) $name_vorher = session_name (SESSION_NAME); //"ServerTools");
|
||||
session_start();//repeated start session without new parameters
|
||||
$_SESSION['endTime'] = time()+ SESSION_COOKIE_LIFETIME;
|
||||
?>
|
||||
fetchAccess(true); //with issue remaining term
|
||||
//fetchAccess(false); //without issue remaining term
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', dokumentLoadDone , false);
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
//original code
|
||||
phpinfo();
|
||||
?>
|
||||
Reference in New Issue
Block a user