states, and pulls data from the authenticated /api/v1/tenant/packages endpoint.
(resources/js/admin/pages/EventFormPage.tsx, resources/js/admin/api.ts)
- Harden tenant-admin auth flow: prevent PKCE state loss, scope out StrictMode double-processing, add SPA
routes for /event-admin/login and /event-admin/logout, and tighten token/session clearing semantics (resources/js/admin/auth/{context,tokens}.tsx, resources/js/admin/pages/{AuthCallbackPage,LogoutPage}.tsx,
resources/js/admin/router.tsx, routes/web.php)
47 lines
940 B
PHP
47 lines
940 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class RefreshTokenAudit extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'refresh_token_id',
|
|
'tenant_id',
|
|
'client_id',
|
|
'event',
|
|
'context',
|
|
'ip_address',
|
|
'user_agent',
|
|
'performed_by',
|
|
'created_at',
|
|
];
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'context' => 'array',
|
|
'created_at' => 'datetime',
|
|
];
|
|
|
|
public function refreshToken(): BelongsTo
|
|
{
|
|
return $this->belongsTo(RefreshToken::class);
|
|
}
|
|
|
|
public function tenant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
|
|
public function performedBy(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'performed_by');
|
|
}
|
|
}
|