Your API will respond with either a raw JSON object or a signed JWT, both following this data structure:

type UserInfo = {
  expiresAt?: number;
  groups?: string[];
  content?: Record<string, any>;
  apiPlaygroundInputs?: {
    header?: Record<string, any>;
    query?: Record<string, any>;
    cookie?: Record<string, any>;
    server?: Record<string, string>;
  };
};
expiresAt
number

Time in seconds since epoch when data should expire. For JWT Auth: This differs from the JWT exp claim - set exp to a short duration (e.g., 10 seconds) and expiresAt for longer data freshness (days/weeks).

groups
string[]

User group memberships that determine page access. Pages will be shown if they match any group listed here.

content
object

Values accessible in MDX content via userContext. Example: { firstName: 'Ronan' } enables {userContext.firstName} in MDX.

apiPlaygroundInputs
object

Prefill values for API playground. Only works for fields in your security scheme (header, query, cookie) and server configurations.

Was this page helpful?