UNPKG

@betha-plataforma/oauth

Version:

Biblioteca JavaScript para lidar com o fluxo do OAuth 2.0 em aplicações Web, com suporte a TypeScript.

16 lines (15 loc) 816 B
import { ExtraConfigs } from '../..'; import { AccessTokenResponse, Api, AuthorizeResponse, AuthSession } from '../../Api'; import { Persistence } from '../../Persistence'; import { AuthenticationFlow } from './AuthenticationFlow'; export declare class CodePKCEFlow implements AuthenticationFlow { private readonly api; private readonly transactionManager; constructor(api: Api, storage: Persistence); readonly authorize: (_: boolean, configs: ExtraConfigs) => Promise<void>; readonly handleAuthorizeResponse: () => Promise<AuthSession>; readonly silentAuthorize: () => Promise<AuthSession>; readonly exchangeCode: (authorizeResponse: AuthorizeResponse, silent?: boolean) => Promise<AccessTokenResponse>; private readonly handleBasicAuthorize; private readonly getAuthorizeURL; }