From 2e3497377832d8a90f62219fab275f453b29579c Mon Sep 17 00:00:00 2001 From: eromano Date: Fri, 4 Aug 2023 16:15:12 +0200 Subject: [PATCH] fix unit --- .../lib/auth/services/base-authentication.service.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/src/lib/auth/services/base-authentication.service.ts b/lib/core/src/lib/auth/services/base-authentication.service.ts index 19fc315684..591950ae88 100644 --- a/lib/core/src/lib/auth/services/base-authentication.service.ts +++ b/lib/core/src/lib/auth/services/base-authentication.service.ts @@ -45,7 +45,7 @@ export abstract class BaseAuthenticationService implements AuthenticationService ee(this); } - abstract getAuthHeaders(requestUrl: string, header: HttpHeaders): HttpHeaders; + abstract getAuthHeaders(requestUrl: string, header: HttpHeaders): HttpHeaders; abstract getToken(): string; @@ -98,8 +98,12 @@ export abstract class BaseAuthenticationService implements AuthenticationService * @returns True if supported, false otherwise */ isBPMProvider(): boolean { - const provider = this.appConfig.get('providers'); - return provider && provider.toUpperCase() === 'BPM'; + const provider = this.appConfig.get('providers'); + if (provider && (typeof provider === 'string' || provider instanceof String)) { + return provider && provider.toUpperCase() === 'BPM'; + } else { + return false; + } } /**