|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace authkit2\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User's OIDC token.
|
|
|
|
*
|
|
|
|
* @property string $id
|
|
|
|
* @property int $user_id
|
|
|
|
* @property string $access_token
|
|
|
|
* @property string $refresh_token
|
|
|
|
*/
|
|
|
|
class Token extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Override the default generated table name so we can namespace this and
|
|
|
|
* avoid conflicting with anything the app might already be using.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $table = 'authkit2_token';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Disable Eloquent's default created/updated fields.
|
|
|
|
*
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $timestamps = false;
|
|
|
|
}
|