AgentTokenValidation
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $actingUserId : string|null
- The delegating user carried in the `act.sub` claim of the token, or `null` for autonomous sessions.
- $agentInstanceId : string
- The agent instance the token was minted for.
- $agentInstanceSessionId : string
- The agent instance session backing the token.
- $intent : string|null
- The caller-supplied context echoed into the token at mint time, or `null` when none was given.
- $organizationId : string
- The organization the agent acts within.
- $permissions : array<string|int, string>
- The effective permission slugs carried by the token.
- $sessionExpiresAt : string
- When the backing agent instance session expires.
- $valid : bool
- Always `true`: an invalid token is reported as an error with a stable code, never as a `200`.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$actingUserId
The delegating user carried in the `act.sub` claim of the token, or `null` for autonomous sessions.
public
string|null
$actingUserId
$agentInstanceId
The agent instance the token was minted for.
public
string
$agentInstanceId
$agentInstanceSessionId
The agent instance session backing the token.
public
string
$agentInstanceSessionId
$intent
The caller-supplied context echoed into the token at mint time, or `null` when none was given.
public
string|null
$intent
$organizationId
The organization the agent acts within.
public
string
$organizationId
$permissions
The effective permission slugs carried by the token.
public
array<string|int, string>
$permissions
$sessionExpiresAt
When the backing agent instance session expires.
public
string
$sessionExpiresAt
$valid
Always `true`: an invalid token is reported as an error with a stable code, never as a `200`.
public
bool
$valid
Methods
__construct()
public
__construct(bool $valid, string $agentInstanceId, string $agentInstanceSessionId, string $organizationId, array<string|int, mixed> $permissions, string|null $intent, string|null $actingUserId, string $sessionExpiresAt) : mixed
Parameters
- $valid : bool
- $agentInstanceId : string
- $agentInstanceSessionId : string
- $organizationId : string
- $permissions : array<string|int, mixed>
- $intent : string|null
- $actingUserId : string|null
- $sessionExpiresAt : string
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>