import { Http } from '@angular/http'; import { Observable } from 'rxjs'; import { PuiAuthProvider } from './auth.provider'; import { PuiUserProvider } from './user.provider'; import { PuiAuthRequest, PuiAuthResponse, PuiAuthData, PuiAuthEvent } from './auth-config'; import { PuiStorageService } from './../data/index'; import { PuiCoreServiceConfig } from '../index'; export declare class PuiAuthService { private authProvider; private http; private userProvider; private storageService; private storage; private keys; private _message; private _useWia; private _useOAuth; private auth0; private oAuthConfig; /** * Refresh timer subscription for OAuth tokens */ private refreshSub; /** * @prop authEvent - Observable to notify components and services of events occuring during the authentication process */ readonly authEvent: Observable; /** * @prop $authEvent - Subject to notify components and services of events occuring during the authentication process */ private readonly $authEvent; readonly tokenExpiresAt: number; readonly useWia: boolean; readonly useOAuth: boolean; readonly isLoggedIn: boolean; readonly message: any; redirectUrl: string; constructor(authProvider: PuiAuthProvider, http: Http, userProvider: PuiUserProvider, storageService: PuiStorageService, config: PuiCoreServiceConfig); private handleAuthResult(err, authResult); /** * Retrieves and stores the User OAuth profile from Auth0 * * @param authResult {Object} OAuth result object * @prop accessToken {string} OAuth access token */ private setOAuthProfile(authResult); /** * Renews an OAuth token by executing the Auth0 silent authentication */ private renewToken(); /** * Schedules a timer for OAuth token renewal */ private scheduleRenewal(); /** * Unschedules the timer for OAuth renewal */ private unscheduleRenewal(); login(request?: PuiAuthRequest): Observable; logout(): void; private setAuthData(authData); getAuthData(): PuiAuthData; }