/** * OAuth Token Response (RFC 6749 Section 5.1) */ export interface TokenResponse { access_token: string; token_type: "Bearer"; expires_in: number; refresh_token?: string; scope?: string; } /** * OAuth Introspection Response (RFC 7662 Section 2.2) */ export interface IntrospectResponse { active: boolean; scope?: string; client_id?: string; username?: string; token_type?: string; exp?: number; iat?: number; sub?: string; aud?: string; iss?: string; } /** * OAuth Error Response (RFC 6749 Section 5.2) */ export interface ErrorResponse { error: string; error_description?: string; error_uri?: string; } /** * OAuth Token Serialiser * * Serializes OAuth token responses per RFC 6749. * Note: These are NOT JSON:API format - they follow OAuth RFC formats. */ export declare class OAuthTokenSerialiser { /** * Serializes an access token response. */ serialiseTokenResponse(params: { accessToken: string; expiresIn: number; refreshToken?: string; scope?: string; }): TokenResponse; /** * Serializes a token introspection response. */ serialiseIntrospectResponse(params: { active: boolean; scope?: string; clientId?: string; username?: string; tokenType?: string; exp?: number; iat?: number; sub?: string; aud?: string; iss?: string; }): IntrospectResponse; /** * Serializes an OAuth error response. */ serialiseErrorResponse(error: string, errorDescription?: string, errorUri?: string): ErrorResponse; } //# sourceMappingURL=oauth.token.serialiser.d.ts.map