import * as jose from 'jose'; import { UserContext } from '../../context/types'; export type RowndAuthenticatedUser = { user_id: string; access_token: string; }; export type IsAuthenticatedResponse = { user_id: string; access_token: string; is_authenticated: true; is_expired: boolean; err: undefined; } | { user_id: undefined; access_token: undefined; is_authenticated: false; is_expired: boolean; err: Error; }; export declare const CLAIM_USER_ID = "https://auth.rownd.io/app_user_id"; export declare const getRowndApiUrl: () => URL; type Keystore = (protectedHeader?: jose.JWSHeaderParameters, token?: jose.FlattenedJWSInput) => Promise; export declare class TokenHandler { private readonly joseInstance; private keystoreCache; constructor(joseInstance?: typeof jose); getKeystore(): Promise; getRowndAuthenticationStatus(cookie: string | null, { allowExpired }?: { allowExpired?: boolean; }): Promise; determineAccessTokenFromCookie(cookie: string): string | undefined; validateAccessToken(accessToken?: string): Promise<{ payload: jose.JWTPayload; accessToken: string; }>; getRowndUserData(accessToken: string): Promise; } export declare const getRowndAuthenticationStatus: (cookie: string | null, { allowExpired }?: { allowExpired?: boolean | undefined; }) => Promise; export declare const getRowndUserData: (accessToken: string) => Promise; export {};