UNPKG

ng-smart-on-fhir

Version:

[![SRDC](https://www.srdc.com.tr/wp-content/uploads/2014/12/srdc-wp.png)](https://srdc.com.tr/en)

44 lines (43 loc) 1.67 kB
import { LoginClientConfig } from "../model/login-client.config"; import { LaunchClientConfig } from "../model/launch-client.config"; import { SmartOnFhirConfig } from "../model/smart-on-fhir.config"; import Client from "fhirclient/lib/Client"; import * as i0 from "@angular/core"; /** * SMART Authentication Service * Handles authentication/authorization using the fhirclient library (or offline via SHC/SHL), and stores the state */ export declare class SmartAuthService { config: SmartOnFhirConfig; private method; private selectedClient; private enabled; private user; private patient; private SAVED_SESSION_KEY; private client$; private clientPromise; private LAUNCHED_URL; constructor(config?: SmartOnFhirConfig); isLoggedIn(): boolean; /** * Login * @param config - selected client's config * @param patient - selected patient, if applicable */ login(config: LoginClientConfig, patient?: fhir4.Patient): void; publicClient(iss: string): Client; launch(iss: string, launch: string, clientConfig?: LaunchClientConfig): void; start(): Promise<any>; offline(patient: fhir4.Patient, shc: string[]): void; saveSession(params?: Object): void; restoreSession(): any; private checkPatientInToken; getClient(): Promise<Client | undefined>; getClientConfig(): LoginClientConfig | LaunchClientConfig | undefined; logout(): void; private clearSession; getPatient(): Promise<import("fhir/r4").Patient | undefined>; static ɵfac: i0.ɵɵFactoryDeclaration<SmartAuthService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SmartAuthService>; }