2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2022-05-22 18:57:06 +00:00
|
|
|
use Laravel\Sanctum\Sanctum;
|
|
|
|
use Pterodactyl\Models\ApiKey;
|
2022-06-26 20:21:07 +00:00
|
|
|
use Pterodactyl\Models\Server;
|
2022-05-22 18:57:06 +00:00
|
|
|
use Pterodactyl\Policies\ServerPolicy;
|
2015-12-06 18:58:49 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* The model to policy mappings for the application.
|
2015-12-06 18:58:49 +00:00
|
|
|
*/
|
|
|
|
protected $policies = [
|
2022-05-22 18:57:06 +00:00
|
|
|
Server::class => ServerPolicy::class,
|
2015-12-06 18:58:49 +00:00
|
|
|
];
|
|
|
|
|
2023-02-23 19:30:16 +00:00
|
|
|
public function boot(): void
|
2015-12-06 18:58:49 +00:00
|
|
|
{
|
2022-05-22 18:57:06 +00:00
|
|
|
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|
2022-05-22 21:01:39 +00:00
|
|
|
|
2023-02-23 19:30:16 +00:00
|
|
|
public function register(): void
|
2022-05-22 21:01:39 +00:00
|
|
|
{
|
|
|
|
Sanctum::ignoreMigrations();
|
|
|
|
}
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|