mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-12 16:18:21 +00:00
Split V5 dashboard behavior into domain controllers and policies, add agent token rotation/revocation, status reconciliation jobs, ingress firewall syncing, and canvas connection APIs. Add migrations for V5 status tracking, server capabilities, resource connection aliases, and revoked agent tokens.
46 lines
1005 B
PHP
46 lines
1005 B
PHP
<?php
|
|
|
|
namespace App\Models\V5;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* A host-agent JWT that has been revoked (typically on server destroy/re-home).
|
|
*
|
|
* flux does not yet consult this list (see AgentTokenIssuer::revoke docblock);
|
|
* it exists so the Laravel side owns the data and API needed for revocation the
|
|
* moment flux gains a revocation check.
|
|
*/
|
|
class RevokedAgentToken extends V5Model
|
|
{
|
|
protected bool $hasUuidColumn = false;
|
|
|
|
protected $table = 'v5_revoked_agent_tokens';
|
|
|
|
protected $fillable = [
|
|
'jti',
|
|
'server_id',
|
|
'revoked_at',
|
|
'expires_at',
|
|
];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'revoked_at' => 'datetime',
|
|
'expires_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<Server, $this>
|
|
*/
|
|
public function server(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Server::class);
|
|
}
|
|
}
|