UNPKG

@alfresco/adf-core

Version:
64 lines (63 loc) 2.62 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 { RedirectAuthService } from '../oidc/redirect-auth.service'; import { EventEmitter } from 'eventemitter3'; import * as i0 from "@angular/core"; type EventEmitterInstance = InstanceType<typeof EventEmitter>; export declare class AuthenticationService implements AuthenticationServiceInterface { private readonly injector; private readonly redirectAuthService; onLogin: Subject<any>; onLogout: Subject<any>; onTokenReceived: Subject<any>; constructor(injector: Injector, redirectAuthService: RedirectAuthService); get on(): EventEmitterInstance['on']; get off(): EventEmitterInstance['off']; get once(): EventEmitterInstance['once']; get emit(): EventEmitterInstance['emit']; 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>; reset(): void; login(username: string, password: string, rememberMe?: boolean): Observable<{ type: string; ticket: any; }>; /** * Gets the username of the authenticated user. * * @returns the username of the authenticated user */ getUsername(): string; getAuthHeaders(requestUrl: string, headers: HttpHeaders): HttpHeaders; isOauth(): boolean; isKerberosEnabled(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>; } export {};