...
This commit is contained in:
19
api/login/isauth.php
Normal file
19
api/login/isauth.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require "../api.php";
|
||||
|
||||
$api = new spamhasiApi();
|
||||
|
||||
if ($api->checkAuth()) {
|
||||
$json["auth"] = true;
|
||||
|
||||
if ($api->checkLogin()) {
|
||||
$json["method"] = "cookie";
|
||||
}else{
|
||||
$json["method"] = "api_key";
|
||||
}
|
||||
}else{
|
||||
$json["auth"] = false;
|
||||
}
|
||||
|
||||
die(json_encode($json));
|
||||
?>
|
||||
Reference in New Issue
Block a user