Skip to content
rw3iss Auth

TokenPair

class rw3iss\AuthServer\Domain\TokenPair src/Domain/TokenPair.php ↗

The token pair returned by /auth/login, /auth/refresh, /auth/sso/exchange.

Wire shape (auth-server/internal/api/dto/auth.go TokenResponse): { access_token, refresh_token, token_type, expires_in, expires_at }

Methods

fromArray()

function fromArray(array $row): self

Parameters

  • $rowarray<string,mixed>

expiresAtSeconds()

function expiresAtSeconds(): int

Absolute expiry as unix epoch seconds. Falls back to (now + expires_in).

toArray()

function toArray(): array

Returns

  • array<string,mixed>