GWM : login token issue
This commit is contained in:
parent
6f37f65968
commit
1fa8c4cfd2
@ -24,6 +24,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
|
||||
$routes->post('auth/login', 'AuthController::login');
|
||||
$routes->get('auth/oauthClient', 'AuthController::oauthClient');
|
||||
$routes->post('auth/oauthlogin', 'AuthController::oauthlogin');
|
||||
$routes->get('auth/logout', 'AuthController::logout');
|
||||
|
||||
|
||||
// MS OAuth api's
|
||||
@ -43,7 +44,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
|
||||
|
||||
$routes->group('api', ['filter' => ["jwtAuth:Org Admin,Travel Admin,Travel Agent,User","appSignature"] ], function ($routes) {
|
||||
|
||||
$routes->get('auth/logout', 'AuthController::logout');
|
||||
|
||||
|
||||
$routes->get('downloadPassport', 'UserController::downloadPassport');
|
||||
|
||||
|
||||
@ -424,17 +424,17 @@ class AuthController extends ResourceController
|
||||
|
||||
if (!$user) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'status' => 404,
|
||||
'message' => 'User not found or inactive'
|
||||
], 400);
|
||||
], 404);
|
||||
}
|
||||
|
||||
// Check token match
|
||||
if ($user['current_token'] !== $token) {
|
||||
return $this->respond([
|
||||
'status' => 401,
|
||||
'status' => 200,
|
||||
'message' => 'Unknown login or invalid token'
|
||||
], 401);
|
||||
], 200);
|
||||
}
|
||||
|
||||
// Token matches — logout success
|
||||
|
||||
Loading…
Reference in New Issue
Block a user