@azure/msal-node 1.4.0 → 1.5.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/CHANGELOG.json +23 -0
- package/CHANGELOG.md +9 -1
- package/dist/cache/NodeStorage.d.ts +5 -1
- package/dist/cache/NodeStorage.d.ts.map +1 -1
- package/dist/crypto/CryptoProvider.d.ts +4 -0
- package/dist/crypto/CryptoProvider.d.ts.map +1 -1
- package/dist/msal-node.cjs.development.js +32 -1
- 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 +32 -1
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/ClientCredentialRequest.d.ts +1 -1
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/DeviceCodeRequest.d.ts +1 -1
- package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
- package/dist/request/OnBehalfOfRequest.d.ts +1 -1
- package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/RefreshTokenRequest.d.ts +1 -1
- package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/SilentFlowRequest.d.ts +1 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -1
- package/dist/request/UsernamePasswordRequest.d.ts +1 -1
- package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/msal-node.esm.js
CHANGED
|
@@ -455,6 +455,14 @@ class CryptoProvider {
|
|
|
455
455
|
signJwt() {
|
|
456
456
|
throw new Error("Method not implemented.");
|
|
457
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* Returns the SHA-256 hash of an input string
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
hashString() {
|
|
464
|
+
throw new Error("Method not implemented.");
|
|
465
|
+
}
|
|
458
466
|
|
|
459
467
|
}
|
|
460
468
|
|
|
@@ -1232,6 +1240,29 @@ class NodeStorage extends CacheManager {
|
|
|
1232
1240
|
static generateJsonCache(inMemoryCache) {
|
|
1233
1241
|
return Serializer.serializeAllCache(inMemoryCache);
|
|
1234
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Updates a credential's cache key if the current cache key is outdated
|
|
1245
|
+
*/
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
updateCredentialCacheKey(currentCacheKey, credential) {
|
|
1249
|
+
const updatedCacheKey = credential.generateCredentialKey();
|
|
1250
|
+
|
|
1251
|
+
if (currentCacheKey !== updatedCacheKey) {
|
|
1252
|
+
const cacheItem = this.getItem(currentCacheKey);
|
|
1253
|
+
|
|
1254
|
+
if (cacheItem) {
|
|
1255
|
+
this.removeItem(currentCacheKey);
|
|
1256
|
+
this.setItem(updatedCacheKey, cacheItem);
|
|
1257
|
+
this.logger.verbose(`Updated an outdated ${credential.credentialType} cache key`);
|
|
1258
|
+
return updatedCacheKey;
|
|
1259
|
+
} else {
|
|
1260
|
+
this.logger.error(`Attempted to update an outdated ${credential.credentialType} cache key but no item matching the outdated key was found in storage`);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
return currentCacheKey;
|
|
1265
|
+
}
|
|
1235
1266
|
|
|
1236
1267
|
}
|
|
1237
1268
|
|
|
@@ -1517,7 +1548,7 @@ class TokenCache {
|
|
|
1517
1548
|
|
|
1518
1549
|
/* eslint-disable header/header */
|
|
1519
1550
|
const name = "@azure/msal-node";
|
|
1520
|
-
const version = "1.
|
|
1551
|
+
const version = "1.5.0";
|
|
1521
1552
|
|
|
1522
1553
|
/*
|
|
1523
1554
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|