import { ServerType } from '@sasjs/utils/types'; import { RequestClient } from '../request/RequestClient'; import { LoginOptions, LoginResult, LoginResultInternal } from '../types/Login'; export declare class AuthManager { private serverUrl; private serverType; private requestClient; private loginCallback; userName: string; userLongName: string; private loginUrl; private logoutUrl; private redirectedLoginUrl; constructor(serverUrl: string, serverType: ServerType, requestClient: RequestClient, loginCallback: () => Promise); /** * Opens Pop up window to SAS Login screen. * And checks if user has finished login process. */ redirectedLogIn({ onLoggedOut }: LoginOptions): Promise; /** * Logs into the SAS server with the supplied credentials. * @param username - a string representing the username. * @param password - a string representing the password. * @returns - a boolean `isLoggedin` and a string `username` */ logIn(username: string, password: string): Promise; private performCASSecurityCheck; private sendLoginRequest; /** * Checks whether a session is active, or login is required. * @returns - a promise which resolves with an object containing three values * - a boolean `isLoggedIn` * - a string `userName`, * - a string `userFullName` and * - a form `loginForm` if not loggedin. */ checkSession(): Promise; private getNewLoginForm; private fetchUserName; private extractUserName; private extractUserLongName; private getLoginForm; private setLoginUrl; /** * Logs out of the configured SAS server. * */ logOut(): Promise; }