misc_pterodactyl-panel/app/Providers/AuthServiceProvider.php

32 lines
706 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Providers;
use Laravel\Sanctum\Sanctum;
use Pterodactyl\Models\Server;
use Pterodactyl\Models\ApiKey;
use Pterodactyl\Policies\ServerPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
Server::class => ServerPolicy::class,
];
/**
* Register any application authentication / authorization services.
*/
2017-04-01 21:59:43 +00:00
public function boot()
{
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
2017-04-01 21:59:43 +00:00
$this->registerPolicies();
}
}