interface TokenPayload { sub: string; type: string; exp: number; iat: number; username?: string; } export interface AuthResult { userId: string | null; tokenData: TokenPayload | null; error?: string; } /** * Server-side authentication function that verifies and decodes the bearer token from a request * @param request The request object containing headers or a direct token string * @returns Object containing the verified token data or null if invalid */ export declare function authServer(request: { headers: { authorization?: string; cookie?: string; }; } | string): Promise; /** * Next.js specific server-side authentication that automatically extracts the token from headers * @returns Object containing the verified token data or null if invalid */ export declare function currentUser(): Promise; export declare function handleAuthHeaders(headers: Headers, cookies: string | null): Headers; export {}; //# sourceMappingURL=server.d.ts.map