move auth interceptor to the core lib [ci:force]

rebasing develop
This commit is contained in:
Denys Vuika
2025-07-21 13:36:12 +02:00
committed by Anton Ramanovich
parent 880c670593
commit 57854b41cd
13 changed files with 147 additions and 40 deletions
+1
View File
@@ -18,3 +18,4 @@
export * from './lib/types';
export * from './lib/adf-http-client.service';
export * from './lib/interfaces';
export * from './lib/tokens';
@@ -15,7 +15,6 @@
* limitations under the License.
*/
import { SHOULD_ADD_AUTH_TOKEN } from '@alfresco/adf-core/auth';
import { Emitters as JsApiEmitters, HttpClient as JsApiHttpClient } from '@alfresco/js-api';
import { HttpClient, HttpContext, HttpErrorResponse, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
@@ -35,6 +34,7 @@ import { AlfrescoApiResponseError } from './alfresco-api/alfresco-api.response-e
import { Constructor } from './types';
import { RequestOptions, SecurityOptions } from './interfaces';
import ee, { Emitter } from 'event-emitter';
import { SHOULD_ADD_AUTH_TOKEN } from './tokens';
export interface Emitters {
readonly eventEmitter: Emitter;
+20
View File
@@ -0,0 +1,20 @@
/*!
* @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 { HttpContextToken } from '@angular/common/http';
export const SHOULD_ADD_AUTH_TOKEN = new HttpContextToken<boolean>(() => false);