import { OAuthError, WWWAuthError } from '../errors'; import { Tokens } from './types'; export interface DPoPClaims { htm: string; htu: string; iat: number; jti: string; nonce?: string; ath?: string; } export interface DPoPProofParams { keyPair: CryptoKeyPair; url: string; method: string; nonce?: string; accessToken?: string; } export declare type ResourceDPoPProofParams = Omit; declare type DPoPProofTokenRequestParams = Omit; export declare function isDPoPNonceError(obj: any): obj is OAuthError | WWWAuthError; export declare function createJwt(header: object, claims: object, signingKey: CryptoKey): Promise; export declare function cryptoRandomValue(byteLen?: number): string; export declare function generateKeyPair(): Promise; export declare type StoreMethod = 'get' | 'add' | 'delete' | 'clear'; export declare function findKeyPair(pairId?: string): Promise; export declare function clearDPoPKeyPair(pairId: string): Promise; export declare function clearAllDPoPKeyPairs(): Promise; export declare function createDPoPKeyPair(): Promise<{ keyPair: CryptoKeyPair; keyPairId: string; }>; export declare function clearDPoPKeyPairAfterRevoke(revokedToken: 'access' | 'refresh', tokens: Tokens): Promise; export declare function generateDPoPProof({ keyPair, url, method, nonce, accessToken }: DPoPProofParams): Promise; export declare function generateDPoPForTokenRequest({ keyPair, url, method, nonce }: DPoPProofTokenRequestParams): Promise; export {};