import { AuthenticationResponse, ConfigInterface, DataAccessor, TokenData } from '../interfaces'; import { AcceptConsentResponse, AccessTokenResponse, AuthenticationParameters } from './api_interfaces'; /** * login handles login request */ declare function login(globalid: string, clientId: string, password: string): Promise; /** * getAccessToken get correct token based on grant type */ declare function getAccessToken(args: ConfigInterface): Promise; /** * getAccessToken get token for 'refresh' grant type */ declare function getRefreshToken(args: ConfigInterface): Promise; /** * Create an authentication request and prepare next steps. * If consent does not require any pii sharing and all attestations * are attested it triggers automatic consent approve and returns * AuthenticationResponseType.AUTOMATIC_APPROVE. If attestations are missing * it returns AuthenticationResponseType.MISSING_ATTESTATION_FLOW and if there is * PII sharing required it returns AuthenticationResponseType.PII_SHARING */ export declare function handleAuthorizationRequest(authArgs: AuthenticationParameters, access_token: string): Promise; interface ApproveAuthorizationRequest { request_id: string; access_token: string; auth_arguments: AuthenticationParameters; decouple?: boolean; data_accessors?: DataAccessor[]; attestations?: string[]; } /** * Approves the consent and returns OAuth data. */ export declare function approveAuthorizationRequest(params: ApproveAuthorizationRequest): Promise; /** * checks for existing token data stored in cookie */ declare function hasAccessToken(): boolean; export { login, getAccessToken, getRefreshToken, hasAccessToken, };