/*! * @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 { AuthenticationApi } from '../api/auth-rest-api'; import { AlfrescoApiClient } from '../alfrescoApiClient'; import { AlfrescoApiConfig } from '../alfrescoApiConfig'; import { Authentication } from './authentication'; import { AlfrescoApiType } from '../to-deprecate/alfresco-api-type'; import { HttpClient } from '../api-clients/http-client.interface'; export declare class ContentAuth extends AlfrescoApiClient { ticketStorageLabel: string; ticket: string; authApi: AuthenticationApi; constructor(config: AlfrescoApiConfig, alfrescoApi: AlfrescoApiType, httpClient?: HttpClient); setConfig(config: AlfrescoApiConfig): void; changeHost(): void; saveUsername(username: string): void; /** * login Alfresco 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; /** * validate the ticket present in this.config.ticket against the server * @returns A promise that returns if resolved and {error} if rejected. */ validateTicket(): Promise; /** * logout Alfresco API * @returns A promise that returns { authentication ticket} if resolved and {error} if rejected. */ logout(): Promise; /** * Set the current Ticket */ setTicket(ticket: string): void; /** * Get the current Ticket * @returns ticket value */ getTicket(): string; invalidateSession(): void; /** * If the client is logged in return true * @returns `true` if client is logged in, otherwise `false` */ isLoggedIn(): boolean; /** * return the Authentication * @returns authentication object */ getAuthentication(): Authentication; }