Fix trailing comma in DaemonAuthenticate.php, change ServerDetailsController.php to use node authentication
This commit is contained in:
parent
a37e30cd49
commit
658a959e5d
2 changed files with 2 additions and 4 deletions
|
@ -83,9 +83,7 @@ class ServerDetailsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function list(Request $request)
|
public function list(Request $request)
|
||||||
{
|
{
|
||||||
$authorization = substr($request->header('Authorization'), 7);
|
$node = $request->attributes->get('node');
|
||||||
|
|
||||||
$node = $this->nodeRepository->findFirstWhere(['daemonSecret' => $authorization]);
|
|
||||||
$servers = $this->repository->loadEveryServerForNode($node->id);
|
$servers = $this->repository->loadEveryServerForNode($node->id);
|
||||||
|
|
||||||
$configurations = [];
|
$configurations = [];
|
||||||
|
|
|
@ -69,7 +69,7 @@ class DaemonAuthenticate
|
||||||
// Ensure that all of the correct parts are provided in the header.
|
// Ensure that all of the correct parts are provided in the header.
|
||||||
if (count($parts) !== 2 || empty($parts[0]) || empty($parts[1])) {
|
if (count($parts) !== 2 || empty($parts[0]) || empty($parts[1])) {
|
||||||
throw new BadRequestHttpException(
|
throw new BadRequestHttpException(
|
||||||
'The Authorization headed provided was not in a valid format.',
|
'The Authorization headed provided was not in a valid format.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue