import { JwtHelperService } from '@auth0/angular-jwt'; import { Auth0UserProfile, WebAuth } from 'auth0-js'; import { Brolog } from 'brolog'; import { Observable } from 'rxjs'; export declare class Auth { log: Brolog; jwtHelper: JwtHelperService; private expireTimer?; /** * User Profile: https://auth0.com/docs/user-profile * Structure of the User Profile: https://auth0.com/docs/user-profile/user-profile-structure * Control the contents of an ID token: https://auth0.com/docs/tokens/id-token#control-the-contents-of-an-id-token * OpenID Connect Standard Claims: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims */ private profile$; readonly profile: Observable; private valid$; readonly valid: Observable; private accessToken$; readonly accessToken: Observable; private idToken$; readonly idToken: Observable; private refreshToken$; readonly refreshToken: Observable; /** * Persisting user authentication with BehaviorSubject in Angular * - https://netbasal.com/angular-2-persist-your-login-status-with-behaviorsubject-45da9ec43243 * BehaviorSubject.asObservable.toPromise() will not return the last value without next a new one! :( * - https://github.com/ReactiveX/RxJS/issues/1478 * - https://github.com/Reactive-Extensions/RxJS/issues/1088 */ private refreshSubscription; constructor(log: Brolog, jwtHelper: JwtHelperService); init(): Promise; load(): Promise; save(): Promise; logout(): Promise; /** * Lock Configurable Options: https://auth0.com/docs/libraries/lock/v10/customization */ private getAuth0Lock(); getProfile(accessToken: string): Promise; getWebAuth(): WebAuth; /** * */ login(): void; private scheduleExpire(idToken); scheduleRefresh(idToken: string): Promise; startupTokenRefresh(): Promise; unscheduleRefresh(): void; unscheduleExpire(): void; getNewJwt(): Promise; }