import { AuthorizationRequestHandler, StringMap } from '@openid/appauth'; import { IAuthAction } from './auth-action'; import { UserInfoHandler } from './user-info-request-handler'; import { EndSessionHandler } from './end-session-request-handler'; import { IAuthConfig } from './auth-configuration'; import { Browser } from "./auth-browser"; import { StorageBackend, Requestor, AuthorizationServiceConfiguration, TokenResponse, AuthorizationRequest, AuthorizationResponse, AuthorizationError, TokenRequestHandler } from '@openid/appauth'; import { BaseAuthObserver, AuthObserver } from './auth-observer'; export interface IAuthService { signIn(authExtras?: StringMap): void; signOut(): void; refreshToken(): void; loadUserInfo(): void; authorizationCallback(callbackUrl: string): void; endSessionCallback(): void; loadTokenFromStorage(): void; getValidToken(buffer?: number): Promise; addActionObserver(observer: BaseAuthObserver): void; addActionListener(func: (action: IAuthAction) => void): AuthObserver; removeActionObserver(observer: BaseAuthObserver): void; } export declare class AuthService implements IAuthService { protected browser: Browser; protected storage: StorageBackend; protected requestor: Requestor; private _configuration?; private _authConfig?; private _authSubject; private _actionHistory; private _session; protected tokenHandler: TokenRequestHandler; protected userInfoHandler: UserInfoHandler; protected requestHandler: AuthorizationRequestHandler; protected endSessionHandler: EndSessionHandler; constructor(browser?: Browser, storage?: StorageBackend, requestor?: Requestor); get authConfig(): IAuthConfig; set authConfig(value: IAuthConfig); get configuration(): Promise; get history(): IAuthAction[]; get session(): import("./auth-session").IAuthSession; protected notifyActionListers(action: IAuthAction): void; protected setupAuthorizationNotifier(): void; protected onAuthorizationNotification(request: AuthorizationRequest, response: AuthorizationResponse | null, error: AuthorizationError | null): void; protected internalAuthorizationCallback(url: string): Promise; protected internalEndSessionCallback(): Promise; protected performEndSessionRequest(state?: string): Promise; protected performAuthorizationRequest(authExtras?: StringMap, state?: string): Promise; protected requestAccessToken(code: string, codeVerifier?: string): Promise; protected requestTokenRefresh(): Promise; protected internalLoadTokenFromStorage(): Promise; protected internalRequestUserInfo(): Promise; loadTokenFromStorage(): Promise; signIn(authExtras?: StringMap, state?: string): Promise; signOut(state?: string): Promise; refreshToken(): Promise; loadUserInfo(): Promise; authorizationCallback(callbackUrl: string): void; endSessionCallback(): void; getValidToken(buffer?: number): Promise; addActionListener(func: (action: IAuthAction) => void): AuthObserver; addActionObserver(observer: BaseAuthObserver): void; removeActionObserver(observer: BaseAuthObserver): void; }