Protect administrator password and quick logins independently for DPL HN and FUC
This commit is contained in:
1 parent
3a0f499769
commit
bf145846a6
3 files changed
+85
-10
No files matched your search
@@ -74,14 +74,14 @@ class AuthController extends Controller
|
||||
$email = $request->input('email');
|
||||
$password = $request->input('password');
|
||||
|
||||
[$success, $result] = $this->loginService->login($email, $password);
|
||||
|
||||
[$success, $result] = \App\Support\XbAdminLogin::password($request, $email,
|
||||
fn () => $this->loginService->login($email, $password),
|
||||
fn ($user) => (new AuthService($user))->generateAuthData()
|
||||
);
|
||||
if (!$success) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
$authService = new AuthService($result);
|
||||
return $this->success($authService->generateAuthData());
|
||||
return $this->success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,11 +118,10 @@ class AuthController extends Controller
|
||||
], 400);
|
||||
}
|
||||
|
||||
$authService = new AuthService($user);
|
||||
|
||||
return response()->json([
|
||||
'data' => $authService->generateAuthData()
|
||||
]);
|
||||
$auth = \App\Support\XbAdminLogin::verified($request, $user,
|
||||
fn ($account) => (new AuthService($account))->generateAuthData()
|
||||
);
|
||||
return response()->json(['data' => $auth]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in new issue
Block a user