@alfresco/adf-core
Version:
17 lines (16 loc) • 819 B
TypeScript
import { LoginOptions } from 'angular-oauth2-oidc';
import * as i0 from "@angular/core";
export declare class RetryLoginService {
private oauthService;
/**
* Attempts to log in a specified number of times if the initial login attempt fails.
*
* @param loginOptions - The options to be used for the login attempt.
* @param maxLoginAttempts - The maximum number of login attempts. Defaults to 3.
* @returns A promise that resolves to `true` if the login is successful, or rejects with an error if all attempts fail.
*/
tryToLoginTimes(loginOptions: LoginOptions, maxLoginAttempts?: number): Promise<boolean>;
private getErrorMessage;
static ɵfac: i0.ɵɵFactoryDeclaration<RetryLoginService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<RetryLoginService>;
}