UNPKG

@alfresco/adf-core

Version:
72 lines (71 loc) 2.7 kB
/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Injector } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { HttpHeaders } from '@angular/common/http'; import { AuthenticationServiceInterface } from '../interfaces/authentication-service.interface'; import ee from 'event-emitter'; import { RedirectAuthService } from '../oidc/redirect-auth.service'; import * as i0 from "@angular/core"; export declare class AuthenticationService implements AuthenticationServiceInterface, ee.Emitter { private injector; private redirectAuthService; onLogin: Subject<any>; onLogout: Subject<any>; onTokenReceived: Subject<any>; constructor(injector: Injector, redirectAuthService: RedirectAuthService); get on(): ee.EmitterMethod; get off(): ee.EmitterMethod; get once(): ee.EmitterMethod; get emit(): (type: string, ...args: any[]) => void; get onError(): Observable<any>; addTokenToHeader(requestUrl: string, headersArg?: HttpHeaders): Observable<HttpHeaders>; isECMProvider(): boolean; isBPMProvider(): boolean; isALLProvider(): boolean; private get oidcAuthenticationService(); private get basicAlfrescoAuthService(); getToken(): string; isLoggedIn(): boolean; logout(): Observable<any>; isEcmLoggedIn(): boolean; isBpmLoggedIn(): boolean; reset(): void; login(username: string, password: string, rememberMe?: boolean): Observable<{ type: string; ticket: any; }>; /** * @returns the username of the authenticated user */ getUsername(): string; /** * @deprecated * @returns the logged username */ getEcmUsername(): string; /** * @deprecated * @returns the logged username */ getBpmUsername(): string; getAuthHeaders(requestUrl: string, headers: HttpHeaders): HttpHeaders; isOauth(): boolean; isKerberosEnabled(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>; }