Interface SubHandleMetadata

Metadata for a SubHandle, extending HandleMetadata with constraints that govern session creation.

All constraint fields are optional. When present, they are enforced by SubHandle.validateSessionOptions at session creation time.

interface SubHandleMetadata {
    displayName?: string;
    avatar?: string;
    allowedAudiences?: string[];
    allowedScopes?: string[];
    maxSessionTtl?: number;
    expiresAt?: number;
}

Hierarchy (view full)

Properties

displayName?: string

Human-readable display name.

avatar?: string

URL or data-URI of an avatar image.

allowedAudiences?: string[]

Restricts the set of audiences this SubHandle may create sessions for. undefined = unrestricted; [] = deny all.

allowedScopes?: string[]

Restricts the set of scopes this SubHandle may request in sessions. undefined = unrestricted; [] = deny all.

maxSessionTtl?: number

Maximum allowed TTL (in seconds) for sessions created by this SubHandle. Attempts to create a session with a larger TTL will be rejected.

expiresAt?: number

Unix timestamp (in seconds) at which this SubHandle itself expires. After this time, any attempt to create a session will fail. Useful for temporary access grants (e.g., contractor access for 2 weeks).