Update: 2026-07-10 13:41:34
This commit is contained in:
@@ -85,6 +85,12 @@ function getNabehBearerToken(): ?string {
|
||||
$response = curlCall("POST", $apiUrl, json_encode($payload), [
|
||||
'Content-Type: application/json'
|
||||
]);
|
||||
|
||||
$debugLog = "[ " . date('Y-m-d H:i:s') . " ]\n";
|
||||
$debugLog .= "Request to: $apiUrl\n";
|
||||
$debugLog .= "Payload: " . json_encode($payload) . "\n";
|
||||
$debugLog .= "Response: " . $response . "\n";
|
||||
file_put_contents(__DIR__ . '/../../../logs/nabeh_debug.txt', $debugLog, FILE_APPEND);
|
||||
|
||||
if ($response) {
|
||||
$decoded = json_decode($response, true);
|
||||
@@ -95,6 +101,8 @@ function getNabehBearerToken(): ?string {
|
||||
if ($redis) {
|
||||
try {
|
||||
$redis->setex('nabeh_bearer_token', 86400, $token);
|
||||
$debugLog = "Token cached in Redis successfully.\n";
|
||||
file_put_contents(__DIR__ . '/../../../logs/nabeh_debug.txt', $debugLog, FILE_APPEND);
|
||||
} catch (Exception $e) {
|
||||
$msg = "⚠️ [Nabeh Auth Redis Cache Save] Error saving token: " . $e->getMessage();
|
||||
error_log($msg);
|
||||
|
||||
@@ -574,7 +574,7 @@ class AppLink {
|
||||
"$auth/passenger/remove_account.php";
|
||||
static String get verifyEmail => "$auth/verifyEmail.php";
|
||||
//===================Auth Captin============
|
||||
static String get authCaptin => '$server/auth/captin';
|
||||
static String get authCaptin => '$server/auth/driver';
|
||||
static String get loginCaptin => "$authCaptin/login.php";
|
||||
static String get loginFromGoogleCaptin => "$authCaptin/loginFromGoogle.php";
|
||||
static String get loginUsingCredentialsWithoutGoogle =>
|
||||
|
||||
@@ -470,7 +470,7 @@ class AppLink {
|
||||
static String get loginFirstTime => "$server/loginFirstTime.php";
|
||||
static String get getTesterApp => "$auth/Tester/getTesterApp.php";
|
||||
static String get updateTesterApp => "$auth/Tester/updateTesterApp.php";
|
||||
static String get signUp => "$auth/signup.php";
|
||||
static String get signUp => "$auth/passenger/register.php";
|
||||
static String get savePassengerLocation =>
|
||||
"$auth/passenger/save_location.php";
|
||||
static String get sendVerifyEmail => "$auth/sendVerifyEmail.php";
|
||||
@@ -485,7 +485,7 @@ class AppLink {
|
||||
"$auth/passenger/remove_account.php";
|
||||
static String get verifyEmail => "$auth/verifyEmail.php";
|
||||
//===================Auth Captin============
|
||||
static String get authCaptin => '$server/auth/captin';
|
||||
static String get authCaptin => '$server/auth/driver';
|
||||
static String get loginCaptin => "$authCaptin/login.php";
|
||||
static String get loginFromGoogleCaptin => "$authCaptin/loginFromGoogle.php";
|
||||
static String get signUpCaptin => "$authCaptin/register.php";
|
||||
|
||||
Reference in New Issue
Block a user