UNPKG

@alfresco/adf-core

Version:
57 lines (56 loc) 1.92 kB
import { AdfHttpClient } from '@alfresco/adf-core/api'; import { Authentication } from '../interfaces/authentication.interface'; import { AppConfigService } from '../../app-config/app-config.service'; import { StorageService } from '../../common/services/storage.service'; import { ReplaySubject, Subject } from 'rxjs'; import * as i0 from "@angular/core"; export declare class ProcessAuth { private appConfigService; private adfHttpClient; private storageService; onLogin: ReplaySubject<any>; onLogout: ReplaySubject<any>; onError: Subject<any>; ticket: string; config: { ticketBpm: any; }; authentications: Authentication; get basePath(): string; constructor(appConfigService: AppConfigService, adfHttpClient: AdfHttpClient, storageService: StorageService); private setConfig; saveUsername(username: string): void; getUsername(): string; /** * login Activiti API * * @param username Username to login * @param password Password to login * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected. */ login(username: string, password: string): Promise<any>; /** * logout Alfresco API * * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected. */ logout(): Promise<any>; basicAuth(username: string, password: string): string; /** * Set the current Ticket * * @param ticket a string representing the ticket */ setTicket(ticket: string): void; invalidateSession(): void; /** * @returns the current Ticket */ getToken(): string; /** * @returns If the client is logged in return true */ isLoggedIn(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ProcessAuth, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ProcessAuth>; }