Initial pass at implementing Laravel Sanctum for authorization on the API
This commit is contained in:
parent
e313dff674
commit
bd37978a98
13 changed files with 324 additions and 220 deletions
23
app/Extensions/Laravel/Sanctum/NewAccessToken.php
Normal file
23
app/Extensions/Laravel/Sanctum/NewAccessToken.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Extensions\Laravel\Sanctum;
|
||||
|
||||
use Pterodactyl\Models\ApiKey;
|
||||
use Laravel\Sanctum\NewAccessToken as SanctumAccessToken;
|
||||
|
||||
/**
|
||||
* @property \Pterodactyl\Models\ApiKey $accessToken
|
||||
*/
|
||||
class NewAccessToken extends SanctumAccessToken
|
||||
{
|
||||
/**
|
||||
* NewAccessToken constructor.
|
||||
*
|
||||
* @noinspection PhpMissingParentConstructorInspection
|
||||
*/
|
||||
public function __construct(ApiKey $accessToken, string $plainTextToken)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
$this->plainTextToken = $plainTextToken;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue