Interface AnonymousSessionClaims

Decoded claims from an anonymous session token (JWT).

Not returned by any method in EA. In EA, session tokens are issued as opaque JWEs — they cannot be decoded client-side and no SDK method currently returns this type. It is exported for forward compatibility: if session tokens move to a readable JWT format in a future release, this interface will describe the claims shape without a breaking change.

interface AnonymousSessionClaims {
    aud: string | string[];
    exp: number;
    iat: number;
    iss: string;
    metadata?: Record<string, string>;
    sid: string;
    sub: string;
}

Properties

aud: string | string[]

Audience — the tenant issuer URL.

exp: number

Expiry timestamp (seconds since epoch).

iat: number

Issued-at timestamp (seconds since epoch).

iss: string

Issuer of the token.

metadata?: Record<string, string>

Up to 1KB of key-value metadata set at session creation time.

sid: string

Session ID.

sub: string

Subject — the anonymous identity, e.g. anon@<uuid>.