import { AngularDataContext } from '@themost/angular'; import { ConfigurationService } from '../../shared/services/configuration.service'; import { ActivatedRoute } from '@angular/router'; import { ActivatedUser } from './activated-user.service'; export interface AuthCallbackResponse { access_token: string; expires_in: number; refresh_token?: string; refresh_expires_in?: number; token_type: string; scope: string; } export interface OnRefreshToken { refresh(): Promise; } export declare class AuthenticationService { protected configuration: ConfigurationService; protected context: AngularDataContext; protected activatedRoute: ActivatedRoute; protected activatedUser: ActivatedUser; constructor(configuration: ConfigurationService, context: AngularDataContext, activatedRoute: ActivatedRoute, activatedUser: ActivatedUser); /** * Generates an OAuth2 state param based on the given string. * @param {string} value * @returns {string} */ protected generateState(value: string): string; /** * Gets an OAuth2 code_verifier * @returns {string} */ protected getCodeVerifier(): string; /** * Redirects user to OAuth2 server authorization URL. This operation initializes an implicit authorization flow. */ authorize(): void; protected preCallback(queryParams: any): void; /** * Handles OAuth2 server callback of an implicit authorization flow. * @param {*} queryParams * @returns {Promise<*>} - Returns an object which represents the authorized user. */ callback(queryParams: any): Promise; /** * Returns the logout URL. * @returns {string} */ protected getLogoutURL(): string; /** * Performs user logout. * @returns {Promise} - Returns true if user has been logged out succesfully. Otherwise returns false. */ logout(): Promise; }