UNPKG

@atproto/oauth-client

Version:

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

19 lines 1.07 kB
import { Fetch } from '@atproto-labs/fetch'; import { CachedGetter, GetCachedOptions, SimpleStore } from '@atproto-labs/simple-store'; import { OAuthAuthorizationServerMetadata } from '@atproto/oauth-types'; export type { GetCachedOptions, OAuthAuthorizationServerMetadata }; export type AuthorizationServerMetadataCache = SimpleStore<string, OAuthAuthorizationServerMetadata>; export type OAuthAuthorizationServerMetadataResolverConfig = { allowHttpIssuer?: boolean; }; /** * @see {@link https://datatracker.ietf.org/doc/html/rfc8414} */ export declare class OAuthAuthorizationServerMetadataResolver extends CachedGetter<string, OAuthAuthorizationServerMetadata> { private readonly fetch; private readonly allowHttpIssuer; constructor(cache: AuthorizationServerMetadataCache, fetch?: Fetch, config?: OAuthAuthorizationServerMetadataResolverConfig); get(input: string, options?: GetCachedOptions): Promise<OAuthAuthorizationServerMetadata>; private fetchMetadata; } //# sourceMappingURL=oauth-authorization-server-metadata-resolver.d.ts.map