Begin implementation of new daemon authentication scheme
This commit is contained in:
parent
8722571037
commit
906a699ee2
23 changed files with 796 additions and 145 deletions
|
@ -28,6 +28,7 @@ use View;
|
|||
use Cache;
|
||||
use Pterodactyl\Models;
|
||||
use Pterodactyl\Observers;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
|
@ -37,6 +38,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
|
||||
Models\User::observe(Observers\UserObserver::class);
|
||||
Models\Server::observe(Observers\ServerObserver::class);
|
||||
Models\Subuser::observe(Observers\SubuserObserver::class);
|
||||
|
|
|
@ -40,6 +40,7 @@ use Pterodactyl\Repositories\Eloquent\SubuserRepository;
|
|||
use Pterodactyl\Repositories\Eloquent\DatabaseRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\LocationRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ScheduleRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\DaemonKeyRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\AllocationRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\PermissionRepository;
|
||||
use Pterodactyl\Repositories\Daemon\ConfigurationRepository;
|
||||
|
@ -61,6 +62,7 @@ use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
|
|||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DaemonKeyRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
|
@ -87,6 +89,7 @@ class RepositoryServiceProvider extends ServiceProvider
|
|||
$this->app->bind(AllocationRepositoryInterface::class, AllocationRepository::class);
|
||||
$this->app->bind(ApiKeyRepositoryInterface::class, ApiKeyRepository::class);
|
||||
$this->app->bind(ApiPermissionRepositoryInterface::class, ApiPermissionRepository::class);
|
||||
$this->app->bind(DaemonKeyRepositoryInterface::class, DaemonKeyRepository::class);
|
||||
$this->app->bind(DatabaseRepositoryInterface::class, DatabaseRepository::class);
|
||||
$this->app->bind(DatabaseHostRepositoryInterface::class, DatabaseHostRepository::class);
|
||||
$this->app->bind(LocationRepositoryInterface::class, LocationRepository::class);
|
||||
|
|
|
@ -54,7 +54,11 @@ class RouteServiceProvider extends ServiceProvider
|
|||
->namespace($this->namespace . '\Server')
|
||||
->group(base_path('routes/server.php'));
|
||||
|
||||
Route::middleware(['web', 'daemon'])->prefix('/daemon')
|
||||
Route::middleware(['daemon'])->prefix('/api/remote')
|
||||
->namespace($this->namespace . '\API\Remote')
|
||||
->group(base_path('routes/api-remote.php'));
|
||||
|
||||
Route::middleware(['web', 'daemon-old'])->prefix('/daemon')
|
||||
->namespace($this->namespace . '\Daemon')
|
||||
->group(base_path('routes/daemon.php'));
|
||||
}
|
||||
|
|
Reference in a new issue