OAuth2 Saved Login Session Mechanism
This commit is contained in:
@@ -19,4 +19,22 @@ function enableDebug(){
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
|
||||
function returnError($error){
|
||||
if (gettype($error) == "object") {
|
||||
$error = json_encode($error);
|
||||
}
|
||||
header('Content-type: application/json');
|
||||
echo json_encode(array("error" => $error));
|
||||
exit();
|
||||
}
|
||||
|
||||
function returnSuccess($success, $refreshToken = ""){
|
||||
header('Content-type: application/json');
|
||||
echo json_encode(array(
|
||||
"data" => $success,
|
||||
"refreshToken" => $refreshToken
|
||||
));
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user