UNPKG

session-expiration-alert

Version:

An Angular module to time session expiration. When user session idle time reaches a threshold, then pop up a modal dialog to let user choose to continue session or log out the system. When user session is expired, timer will stop and user will be logged o

26 lines (25 loc) 893 B
import { Observable } from 'rxjs'; import { SessionExpirationConfig } from '../models/session-expiration-config'; import * as i0 from "@angular/core"; export declare class SessionTimerService { readonly config: SessionExpirationConfig; private readonly _timeoutSeconds; private _count; private timerSubscription; private timer; private _remainSeconds; /** * Observable to get session remaining time (in seconds). * * Subscribers need to unsubscribe to it before hosting element is destroyed. * * @memberof SessionTimerService */ remainSeconds$: Observable<number>; constructor(config: SessionExpirationConfig); startTimer(): void; stopTimer(): void; resetTimer(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SessionTimerService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<SessionTimerService>; }