@azure/msal-node 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
- package/dist/config/Configuration.d.ts +8 -2
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/crypto/CryptoProvider.d.ts +1 -0
- package/dist/crypto/CryptoProvider.d.ts.map +1 -1
- package/dist/crypto/GuidGenerator.d.ts +4 -3
- package/dist/crypto/GuidGenerator.d.ts.map +1 -1
- package/dist/crypto/PkceGenerator.d.ts.map +1 -1
- package/dist/msal-node.cjs.development.js +36 -23
- package/dist/msal-node.cjs.development.js.map +1 -1
- package/dist/msal-node.cjs.production.min.js +1 -1
- package/dist/msal-node.cjs.production.min.js.map +1 -1
- package/dist/msal-node.esm.js +36 -23
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/network/HttpClient.d.ts.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/utils/EncodingUtils.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientApplication.d.ts","sourceRoot":"","sources":["../src/client/ClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,mBAAmB,EAEnB,oBAAoB,EAGpB,eAAe,EAEf,MAAM,EACN,sBAAsB,EAYtB,wBAAwB,EAExB,iBAAiB,EACjB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ClientApplication.d.ts","sourceRoot":"","sources":["../src/client/ClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,mBAAmB,EAEnB,oBAAoB,EAGpB,eAAe,EAEf,MAAM,EACN,sBAAsB,EAYtB,wBAAwB,EAExB,iBAAiB,EACjB,wBAAwB,EAG3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAyB,iBAAiB,EAAE,MAAM,yBAAy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kB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA8B1F;;;;;;;;;OASG;IACG,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA2B5G;;OAEG;IACH,aAAa,IAAI,UAAU;IAK3B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;cACa,6BAA6B,CAAC,SAAS,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAkD1Q,OAAO,CAAC,kBAAkB;IAO1B;;;OAGG;cACa,qBAAqB,CAAC,WAAW,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAsBtG;;;;;OAKG;IACH,SAAS,CAAC,gCAAgC,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,sBAAsB;IAWhI;;;;OAIG;YACW,eAAe;IAiB7B;;OAEG;IACH,UAAU,IAAI,IAAI;CAGrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAKH,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAKH,oBAAoB,EAMvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,6BAA8B,SAAQ,iBAAkB,YAAW,8BAA8B;IAE1G;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IAKxC;;OAEG;IACU,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA+BnH;;;;;;;;;;OAUG;IACU,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAyBrG,OAAO,CAAC,mBAAmB;CAkC9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions } from "@azure/msal-common";
|
|
1
|
+
import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin, AzureCloudOptions, ApplicationTelemetry } from "@azure/msal-common";
|
|
2
2
|
/**
|
|
3
3
|
* - clientId - Client id of the application.
|
|
4
4
|
* - authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
|
|
@@ -47,6 +47,9 @@ export declare type NodeSystemOptions = {
|
|
|
47
47
|
networkClient?: INetworkModule;
|
|
48
48
|
proxyUrl?: string;
|
|
49
49
|
};
|
|
50
|
+
export declare type NodeTelemetryOptions = {
|
|
51
|
+
application?: ApplicationTelemetry;
|
|
52
|
+
};
|
|
50
53
|
/**
|
|
51
54
|
* Use the configuration object to configure MSAL and initialize the client application object
|
|
52
55
|
*
|
|
@@ -59,11 +62,13 @@ export declare type Configuration = {
|
|
|
59
62
|
auth: NodeAuthOptions;
|
|
60
63
|
cache?: CacheOptions;
|
|
61
64
|
system?: NodeSystemOptions;
|
|
65
|
+
telemetry?: NodeTelemetryOptions;
|
|
62
66
|
};
|
|
63
67
|
export declare type NodeConfiguration = {
|
|
64
68
|
auth: Required<NodeAuthOptions>;
|
|
65
69
|
cache: CacheOptions;
|
|
66
70
|
system: Required<NodeSystemOptions>;
|
|
71
|
+
telemetry: Required<NodeTelemetryOptions>;
|
|
67
72
|
};
|
|
68
73
|
/**
|
|
69
74
|
* Sets the default options when not explicitly configured from app developer
|
|
@@ -71,9 +76,10 @@ export declare type NodeConfiguration = {
|
|
|
71
76
|
* @param auth - Authentication options
|
|
72
77
|
* @param cache - Cache options
|
|
73
78
|
* @param system - System options
|
|
79
|
+
* @param telemetry - Telemetry options
|
|
74
80
|
*
|
|
75
81
|
* @returns Configuration
|
|
76
82
|
* @public
|
|
77
83
|
*/
|
|
78
|
-
export declare function buildAppConfiguration({ auth, cache, system, }: Configuration): NodeConfiguration;
|
|
84
|
+
export declare function buildAppConfiguration({ auth, cache, system, telemetry }: Configuration): NodeConfiguration;
|
|
79
85
|
//# sourceMappingURL=Configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../src/config/Configuration.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EAGZ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../src/config/Configuration.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EAGZ,iBAAiB,EACjB,oBAAoB,EACvB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;GASG;AACH,oBAAY,eAAe,GAAG;I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,iBAAiB,CAAC,CAAC;IACpC,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACZ,EAAE,aAAa,GAAG,iBAAiB,CAQnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMxD;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;;
|
|
1
|
+
{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMxD;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;;IAS7B;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAIvC;;OAEG;IACH,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;OAGG;IACH,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvD"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { IGuidGenerator } from "@azure/msal-common";
|
|
2
|
+
export declare class GuidGenerator implements IGuidGenerator {
|
|
2
3
|
/**
|
|
3
4
|
*
|
|
4
5
|
* RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers.
|
|
5
6
|
* uuidv4 generates guids from cryprtographically-string random
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
generateGuid(): string;
|
|
8
9
|
/**
|
|
9
10
|
* verifies if a string is GUID
|
|
10
11
|
* @param guid
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
isGuid(guid: string): boolean;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=GuidGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,qBAAa,aAAc,YAAW,cAAc;IAChD;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAIhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM1D;;GAEG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,SAAS,CAAY;;IAK7B;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAM7C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;;OAGG;IACH,OAAO,CAAC,iCAAiC;CAO5C"}
|
|
@@ -146,7 +146,7 @@ class HttpClient {
|
|
|
146
146
|
url: url,
|
|
147
147
|
|
|
148
148
|
/* istanbul ignore next */
|
|
149
|
-
data: options && options.body ||
|
|
149
|
+
data: options && options.body || msalCommon.Constants.EMPTY_STRING,
|
|
150
150
|
timeout: cancellationToken,
|
|
151
151
|
|
|
152
152
|
/* istanbul ignore next */
|
|
@@ -191,23 +191,23 @@ class NetworkUtils {
|
|
|
191
191
|
* Licensed under the MIT License.
|
|
192
192
|
*/
|
|
193
193
|
const DEFAULT_AUTH_OPTIONS = {
|
|
194
|
-
clientId:
|
|
194
|
+
clientId: msalCommon.Constants.EMPTY_STRING,
|
|
195
195
|
authority: msalCommon.Constants.DEFAULT_AUTHORITY,
|
|
196
|
-
clientSecret:
|
|
197
|
-
clientAssertion:
|
|
196
|
+
clientSecret: msalCommon.Constants.EMPTY_STRING,
|
|
197
|
+
clientAssertion: msalCommon.Constants.EMPTY_STRING,
|
|
198
198
|
clientCertificate: {
|
|
199
|
-
thumbprint:
|
|
200
|
-
privateKey:
|
|
201
|
-
x5c:
|
|
199
|
+
thumbprint: msalCommon.Constants.EMPTY_STRING,
|
|
200
|
+
privateKey: msalCommon.Constants.EMPTY_STRING,
|
|
201
|
+
x5c: msalCommon.Constants.EMPTY_STRING
|
|
202
202
|
},
|
|
203
203
|
knownAuthorities: [],
|
|
204
|
-
cloudDiscoveryMetadata:
|
|
205
|
-
authorityMetadata:
|
|
204
|
+
cloudDiscoveryMetadata: msalCommon.Constants.EMPTY_STRING,
|
|
205
|
+
authorityMetadata: msalCommon.Constants.EMPTY_STRING,
|
|
206
206
|
clientCapabilities: [],
|
|
207
207
|
protocolMode: msalCommon.ProtocolMode.AAD,
|
|
208
208
|
azureCloudOptions: {
|
|
209
209
|
azureCloudInstance: msalCommon.AzureCloudInstance.None,
|
|
210
|
-
tenant:
|
|
210
|
+
tenant: msalCommon.Constants.EMPTY_STRING
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
const DEFAULT_CACHE_OPTIONS = {};
|
|
@@ -220,7 +220,13 @@ const DEFAULT_LOGGER_OPTIONS = {
|
|
|
220
220
|
const DEFAULT_SYSTEM_OPTIONS = {
|
|
221
221
|
loggerOptions: DEFAULT_LOGGER_OPTIONS,
|
|
222
222
|
networkClient: /*#__PURE__*/NetworkUtils.getNetworkClient(),
|
|
223
|
-
proxyUrl:
|
|
223
|
+
proxyUrl: msalCommon.Constants.EMPTY_STRING
|
|
224
|
+
};
|
|
225
|
+
const DEFAULT_TELEMETRY_OPTIONS = {
|
|
226
|
+
application: {
|
|
227
|
+
appName: msalCommon.Constants.EMPTY_STRING,
|
|
228
|
+
appVersion: msalCommon.Constants.EMPTY_STRING
|
|
229
|
+
}
|
|
224
230
|
};
|
|
225
231
|
/**
|
|
226
232
|
* Sets the default options when not explicitly configured from app developer
|
|
@@ -228,6 +234,7 @@ const DEFAULT_SYSTEM_OPTIONS = {
|
|
|
228
234
|
* @param auth - Authentication options
|
|
229
235
|
* @param cache - Cache options
|
|
230
236
|
* @param system - System options
|
|
237
|
+
* @param telemetry - Telemetry options
|
|
231
238
|
*
|
|
232
239
|
* @returns Configuration
|
|
233
240
|
* @public
|
|
@@ -236,7 +243,8 @@ const DEFAULT_SYSTEM_OPTIONS = {
|
|
|
236
243
|
function buildAppConfiguration({
|
|
237
244
|
auth,
|
|
238
245
|
cache,
|
|
239
|
-
system
|
|
246
|
+
system,
|
|
247
|
+
telemetry
|
|
240
248
|
}) {
|
|
241
249
|
return {
|
|
242
250
|
auth: { ...DEFAULT_AUTH_OPTIONS,
|
|
@@ -247,6 +255,9 @@ function buildAppConfiguration({
|
|
|
247
255
|
},
|
|
248
256
|
system: { ...DEFAULT_SYSTEM_OPTIONS,
|
|
249
257
|
...system
|
|
258
|
+
},
|
|
259
|
+
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS,
|
|
260
|
+
...telemetry
|
|
250
261
|
}
|
|
251
262
|
};
|
|
252
263
|
}
|
|
@@ -261,7 +272,7 @@ class GuidGenerator {
|
|
|
261
272
|
* RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or pseudo-random numbers.
|
|
262
273
|
* uuidv4 generates guids from cryprtographically-string random
|
|
263
274
|
*/
|
|
264
|
-
|
|
275
|
+
generateGuid() {
|
|
265
276
|
return uuid.v4();
|
|
266
277
|
}
|
|
267
278
|
/**
|
|
@@ -270,7 +281,7 @@ class GuidGenerator {
|
|
|
270
281
|
*/
|
|
271
282
|
|
|
272
283
|
|
|
273
|
-
|
|
284
|
+
isGuid(guid) {
|
|
274
285
|
const regexGuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
275
286
|
return regexGuid.test(guid);
|
|
276
287
|
}
|
|
@@ -298,7 +309,7 @@ class EncodingUtils {
|
|
|
298
309
|
|
|
299
310
|
|
|
300
311
|
static base64EncodeUrl(str, encoding) {
|
|
301
|
-
return EncodingUtils.base64Encode(str, encoding).replace(/=/g,
|
|
312
|
+
return EncodingUtils.base64Encode(str, encoding).replace(/=/g, msalCommon.Constants.EMPTY_STRING).replace(/\+/g, "-").replace(/\//g, "_");
|
|
302
313
|
}
|
|
303
314
|
/**
|
|
304
315
|
* 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8.
|
|
@@ -393,7 +404,7 @@ class PkceGenerator {
|
|
|
393
404
|
charArr.push(CharSet.CV_CHARSET[index]);
|
|
394
405
|
}
|
|
395
406
|
|
|
396
|
-
const verifier = charArr.join(
|
|
407
|
+
const verifier = charArr.join(msalCommon.Constants.EMPTY_STRING);
|
|
397
408
|
return EncodingUtils.base64EncodeUrl(verifier);
|
|
398
409
|
}
|
|
399
410
|
/**
|
|
@@ -422,6 +433,7 @@ class CryptoProvider {
|
|
|
422
433
|
constructor() {
|
|
423
434
|
// Browser crypto needs to be validated first before any other classes can be set.
|
|
424
435
|
this.pkceGenerator = new PkceGenerator();
|
|
436
|
+
this.guidGenerator = new GuidGenerator();
|
|
425
437
|
this.hashUtils = new HashUtils();
|
|
426
438
|
}
|
|
427
439
|
/**
|
|
@@ -431,7 +443,7 @@ class CryptoProvider {
|
|
|
431
443
|
|
|
432
444
|
|
|
433
445
|
createNewGuid() {
|
|
434
|
-
return
|
|
446
|
+
return this.guidGenerator.generateGuid();
|
|
435
447
|
}
|
|
436
448
|
/**
|
|
437
449
|
* Encodes input string to base64.
|
|
@@ -1591,7 +1603,7 @@ class TokenCache {
|
|
|
1591
1603
|
|
|
1592
1604
|
/* eslint-disable header/header */
|
|
1593
1605
|
const name = "@azure/msal-node";
|
|
1594
|
-
const version = "1.
|
|
1606
|
+
const version = "1.8.0";
|
|
1595
1607
|
|
|
1596
1608
|
/*
|
|
1597
1609
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1830,9 +1842,10 @@ class ClientApplication {
|
|
|
1830
1842
|
libraryInfo: {
|
|
1831
1843
|
sku: Constants.MSAL_SKU,
|
|
1832
1844
|
version: version,
|
|
1833
|
-
cpu: process.arch ||
|
|
1834
|
-
os: process.platform ||
|
|
1845
|
+
cpu: process.arch || msalCommon.Constants.EMPTY_STRING,
|
|
1846
|
+
os: process.platform || msalCommon.Constants.EMPTY_STRING
|
|
1835
1847
|
},
|
|
1848
|
+
telemetry: this.config.telemetry,
|
|
1836
1849
|
persistencePlugin: this.config.cache.cachePlugin,
|
|
1837
1850
|
serializableCache: this.tokenCache
|
|
1838
1851
|
};
|
|
@@ -2110,7 +2123,7 @@ class ClientAssertion {
|
|
|
2110
2123
|
|
|
2111
2124
|
while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
|
|
2112
2125
|
// matches[1] represents the first parens capture group in the regex.
|
|
2113
|
-
certs.push(matches[1].replace(/\n/,
|
|
2126
|
+
certs.push(matches[1].replace(/\n/, msalCommon.Constants.EMPTY_STRING));
|
|
2114
2127
|
}
|
|
2115
2128
|
|
|
2116
2129
|
return certs;
|
|
@@ -2219,8 +2232,8 @@ class ConfidentialClientApplication extends ClientApplication {
|
|
|
2219
2232
|
const clientSecretNotEmpty = !msalCommon.StringUtils.isEmpty(configuration.auth.clientSecret);
|
|
2220
2233
|
const clientAssertionNotEmpty = !msalCommon.StringUtils.isEmpty(configuration.auth.clientAssertion);
|
|
2221
2234
|
const certificate = configuration.auth.clientCertificate || {
|
|
2222
|
-
thumbprint:
|
|
2223
|
-
privateKey:
|
|
2235
|
+
thumbprint: msalCommon.Constants.EMPTY_STRING,
|
|
2236
|
+
privateKey: msalCommon.Constants.EMPTY_STRING
|
|
2224
2237
|
};
|
|
2225
2238
|
const certificateNotEmpty = !msalCommon.StringUtils.isEmpty(certificate.thumbprint) || !msalCommon.StringUtils.isEmpty(certificate.privateKey); // Check that at most one credential is set on the application
|
|
2226
2239
|
|