fixed hak akses kinerja utk opd

This commit is contained in:
2026-08-26 13:15:55 +07:00
parent 8f0060a027
commit a53dbb3a1f
3 changed files with 8 additions and 35 deletions
+1 -28
View File
@@ -21,39 +21,12 @@ use siaupheng\fonia3\Web\Auth;
use siaupheng\fonia3\Web\Param;
use siaupheng\fonia3\DB\MySQL;
/*function requestData($url, $postdata = null){
$ch = curl_init($url);
$headers = array( 'Accept: application/json' );
curl_setopt_array($ch, array(
CURLOPT_POST => 1,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $postdata,
CURLOPT_RETURNTRANSFER =>true,
CURLOPT_VERBOSE => 1
));
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
$token = $_GET['token'];
if (!empty($token) && !$_SESSION['token']) $_SESSION['token'] = $token;
$user = "";
if ($_SESSION['token']) {
$url = "http://127.0.0.1/TEST/sso/provider/cek_token.php?token=".$_SESSION['token'];
$respon = json_decode(requestData($url));
$user = $respon->data;
if ($respon->code != 200) {
unset($_SESSION['token']);
}
}*/
$db = $db ?? new MySQL();
$auth = new Auth($db);
$auth->set_id_reg($_SESSION['__WEB_APP']['PARENT_CODE']);
$token = Param::Get("auth", "");
if (!empty($token) && !$_SESSION['APP_TOKEN']) $_SESSION['APP_TOKEN'] = $token;
if (!empty($token) && !empty($_SESSION['APP_TOKEN'])) $_SESSION['APP_TOKEN'] = $token;
if ($_SESSION['APP_TOKEN'] ?? false) {
if ($auth->token_check()) {
if (!isset($_SESSION['__WEB_USER'])) {