From 03c0b1387a33f27491e21673f0e7fbf612b23ca3 Mon Sep 17 00:00:00 2001 From: Amedeo Lepore Date: Wed, 8 Mar 2023 18:07:40 +0100 Subject: [PATCH] [AAE-12501] Replace Oauth2Auth with AlfrescoApi and call the custom api without using authentication --- lib/core/src/lib/auth/services/oauth2.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/src/lib/auth/services/oauth2.service.ts b/lib/core/src/lib/auth/services/oauth2.service.ts index db6fa14a20..5788021010 100644 --- a/lib/core/src/lib/auth/services/oauth2.service.ts +++ b/lib/core/src/lib/auth/services/oauth2.service.ts @@ -18,7 +18,7 @@ import { Injectable } from '@angular/core'; import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { Observable, from } from 'rxjs'; -import { Oauth2Auth } from '@alfresco/js-api'; +import { AlfrescoApi } from '@alfresco/js-api'; export const JSON_TYPE = ['application/json']; @@ -34,13 +34,13 @@ export interface OAuth2RequestParams { export class OAuth2Service { constructor(private alfrescoApiService: AlfrescoApiService) {} - get apiClient(): Oauth2Auth { - return this.alfrescoApiService.getInstance().oauth2Auth; + get apiClient(): AlfrescoApi { + return this.alfrescoApiService.getInstance(); } request(opts: OAuth2RequestParams): Observable { return from( - this.apiClient.callCustomApi( + this.apiClient.callCustomApiWithoutAuth( opts.url, opts.httpMethod, opts.pathParams,