import OreIdContext from '../../core/IOreidContext'; import { ApiResultWithErrorCode } from '../models'; export declare type ApiLoginUserWithTokenParams = { accessToken?: string; idToken?: string; provider?: string; }; export declare type ApiLoginUserWithTokenBodyParams = { id_token?: string; access_token?: string; provider?: string; }; /** Call api account/login-user-with-token * Converts OAuth accesstoken or idToken from some 3rd-party source to OREID Oauth accessTokens * The third-party (e.g. Auth0 or Google) must be registered in the AppRegistration.oauthSettings * If a user does not curently exist that matches the info in the incoming idToken, a new OreID user and account is created * Requires either: * 1) a valid idToken (needs no accessToken or apiKey in header) * 2) an OreId issued JWT accessToken (needs no accessToken or apiKey in header) * 3) a 3rd-party accessToken (usually not a JWT) and provider param (e.g. 'google') - Requires api-key in header * Returns: OreId issued accessToken and user's account name (if new account created, this is a new account name) * */ export declare function callApiLoginUserWithToken(oreIdContext: OreIdContext, params: ApiLoginUserWithTokenParams): Promise<{ accessToken: string; } & ApiResultWithErrorCode>;