UNPKG

@atproto/oauth-client

Version:

OAuth client for ATPROTO PDS. This package serves as common base for environment-specific implementations (NodeJS, Browser, React-Native).

21 lines 861 B
import { Fetch, FetchContext } from '@atproto-labs/fetch'; import { SimpleStore } from '@atproto-labs/simple-store'; import { Key } from '@atproto/jwk'; export type DpopFetchWrapperOptions<C = FetchContext> = { key: Key; iss: string; nonces: SimpleStore<string, string>; supportedAlgs?: string[]; sha256?: (input: string) => Promise<string>; /** * Is the intended server an authorization server (true) or a resource server * (false)? Setting this may allow to avoid parsing the response body to * determine the dpop-nonce. * * @default undefined */ isAuthServer?: boolean; fetch?: Fetch<C>; }; export declare function dpopFetchWrapper<C = FetchContext>({ key, iss, supportedAlgs, nonces, sha256, isAuthServer, fetch, }: DpopFetchWrapperOptions<C>): Fetch<C>; //# sourceMappingURL=fetch-dpop.d.ts.map