import { Observable } from "rxjs"; import { InitializationUtil } from "./utils/initialization.util"; import { AuthenticatedUser } from "./authenticated-user.model"; import { HttpService } from "./services/http.service"; import { LoaderService } from "./services/loader.service"; import { CookieService } from "./services/cookie.service"; import { LogService } from "./logger/log.service"; import { PermissionService } from "./services/permission.service"; import * as i0 from "@angular/core"; /** * Service to manage authentication-related actions */ export declare class AuthenticationService implements InitializationUtil { private http; private logService; private loaderService; private cookieService; private permissionService; private authenticatedUserSubject; authenticatedUserObservable: Observable; /** * Getter for current user ID */ get userId(): string; /** * Getter for current user name */ get userName(): string; /** * Getter for current user profile status */ get isProfileComplete(): boolean; /** * Setter for current user profile status */ setIsProfileComplete(isProfileComplete: boolean): void; constructor(http: HttpService, logService: LogService, loaderService: LoaderService, cookieService: CookieService, permissionService: PermissionService); /** * Called during app initialization to preload authenticatedUserSubject with data. * Checks for presence of user cookie (encoded `User` object) */ initialize(): Promise; /** * Log a user in using fake authentication * @param userName Username user to log in as */ testLogin(userName: string): void; /** * Log the current user out */ logout(): void; /** * Clears data stored in the subject for authenticated user */ clearAuthenticatedUser(): void; /** * Returns authentication status of current user * @returns boolean */ isAuthenticated(): boolean; /** * Returns an observable to monitor authentication status of current user * @returns Observable */ isAuthenticatedObservable(): Observable; /** * Attempts to refresh the user subject and renew the user cookie. If the existing user cookie has already expired, * this method will perform a server-side call to retrieve the latest user cookie with a new expiry. * @param forceRefresh [Default = false] Set true to forcibly call the remote endpoint to get a new cookie */ refreshUserIfExpired(forceRefresh?: boolean): void; /** * Retrieves the currently logged in user information. * This also renews the expiry time on the cookie. */ getUserInfo(): Observable; /** * Get data from userPreference cookie set by server * @see ngx-cookie-service */ private getUserCookie; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }