Strip out JWT usage and use cookies to track the currently logged in user
This commit is contained in:
parent
a7fae86e58
commit
6336e5191f
9 changed files with 44 additions and 144 deletions
|
@ -5,6 +5,7 @@ namespace Pterodactyl\Models;
|
|||
use Sofa\Eloquence\Eloquence;
|
||||
use Sofa\Eloquence\Validable;
|
||||
use Pterodactyl\Rules\Username;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
@ -177,6 +178,16 @@ class User extends Model implements
|
|||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the user model in a format that can be passed over to Vue templates.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toVueObject(): array
|
||||
{
|
||||
return (new Collection($this->toArray()))->except(['id', 'external_id'])->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the password reset notification.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue