/** * iCure Data Stack API Documentation * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2. * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import { XHR } from './XHR'; import { AuthenticationResponse } from '../model/AuthenticationResponse'; import { LoginCredentials } from '../model/LoginCredentials'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; export declare enum OAuthThirdParty { GOOGLE = "google", MICROSOFT = "microsoft", APPLE = "apple", LINKEDIN = "linkedin", GITHUB = "github" } export declare enum DigitalIdProvider { BE_FAS = "be.fas" } export declare class IccAuthApi { host: string; headers: Array; authenticationProvider: AuthenticationProvider; fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise; constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise); setHeaders(h: Array): void; handleError(e: XHR.XHRError): never; /** * Check login using groupId/userId and password * @summary check * @param body */ check(body?: LoginCredentials): Promise; /** * Login using username and password * @summary login * @param body * @param groupId the group id where to login to. * @param duration the duration of the returned JWT authentication token, in seconds. */ login(body?: LoginCredentials, groupId?: string, duration?: number): Promise; /** * Login using third party OAuth provider token * @summary login * @param thirdParty The third party OAuth service used to authenticate the user * @param token The token returned by the third party OAuth service * @param groupId the group id where to login to. */ loginWithThirdPartyToken(thirdParty: string, token: string, groupId?: string): Promise; /** * Lite only * /auth/ */ loginWithCloudToken(issuer: string, cloudJwt: string): Promise; /** * Logout * @summary logout */ logout(): Promise; /** * Logout * @summary logout */ logoutPost(): Promise; /** * Get token for subsequent operation * @summary token * @param method * @param path */ token(method: string, path: string): Promise; /** * Gets a new authentication and refresh JWT for a different group */ switchGroup(refreshJWT: string, groupId: string): Promise; /** * Gets a new authentication JWT using the refresh JWT * @summary refresh */ refreshAuthenticationJWT(refreshJWT: string): Promise; /** * Switch groups using the refresh JWT * @summary switch groups */ switchGroupUsingRefreshJWT(groupId: string): Promise; /** * Invalidates a refresh JWT * @summary invalidate */ invalidateRefreshJWT(refreshJWT: string): Promise; }