AgentToken
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $accessToken : string
- The agent access token (a JWT) carrying the effective permissions.
- $agentInstanceId : string
- The agent instance the session belongs to.
- $agentInstanceSessionId : string
- The backing agent instance session.
- $expiresIn : int
- Number of seconds until the access token expires.
- $newInstance : bool
- Whether this mint created the agent instance: `true` only for the mint that inserted the row, `false` when an existing instance was reused (including when a concurrent mint inserted it first).
- $permissions : array<string|int, string>
- The effective permission slugs carried by the token.
- $refreshToken : string
- Single-use refresh token for rotating the access token within the session lifetime.
- $tokenType : string
- Always `Bearer`.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$accessToken
The agent access token (a JWT) carrying the effective permissions.
public
string
$accessToken
$agentInstanceId
The agent instance the session belongs to.
public
string
$agentInstanceId
$agentInstanceSessionId
The backing agent instance session.
public
string
$agentInstanceSessionId
$expiresIn
Number of seconds until the access token expires.
public
int
$expiresIn
$newInstance
Whether this mint created the agent instance: `true` only for the mint that inserted the row, `false` when an existing instance was reused (including when a concurrent mint inserted it first).
public
bool
$newInstance
$permissions
The effective permission slugs carried by the token.
public
array<string|int, string>
$permissions
$refreshToken
Single-use refresh token for rotating the access token within the session lifetime.
public
string
$refreshToken
$tokenType
Always `Bearer`.
public
string
$tokenType
Methods
__construct()
public
__construct(string $accessToken, string $tokenType, int $expiresIn, string $refreshToken, string $agentInstanceId, bool $newInstance, string $agentInstanceSessionId, array<string|int, mixed> $permissions) : mixed
Parameters
- $accessToken : string
- $tokenType : string
- $expiresIn : int
- $refreshToken : string
- $agentInstanceId : string
- $newInstance : bool
- $agentInstanceSessionId : string
- $permissions : array<string|int, mixed>
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>