@azure/msal-node 1.16.0 → 1.17.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.
@@ -999,7 +999,7 @@ class Serializer {
999
999
  */
1000
1000
  class NodeStorage extends CacheManager {
1001
1001
  constructor(logger, clientId, cryptoImpl) {
1002
- super(clientId, cryptoImpl);
1002
+ super(clientId, cryptoImpl, logger);
1003
1003
  this.cache = {};
1004
1004
  this.changeEmitters = [];
1005
1005
  this.logger = logger;
@@ -1124,6 +1124,20 @@ class NodeStorage extends CacheManager {
1124
1124
  // write to cache
1125
1125
  this.setCache(cache);
1126
1126
  }
1127
+ getAccountKeys() {
1128
+ const inMemoryCache = this.getInMemoryCache();
1129
+ const accountKeys = Object.keys(inMemoryCache.accounts);
1130
+ return accountKeys;
1131
+ }
1132
+ getTokenKeys() {
1133
+ const inMemoryCache = this.getInMemoryCache();
1134
+ const tokenKeys = {
1135
+ idToken: Object.keys(inMemoryCache.idTokens),
1136
+ accessToken: Object.keys(inMemoryCache.accessTokens),
1137
+ refreshToken: Object.keys(inMemoryCache.refreshTokens)
1138
+ };
1139
+ return tokenKeys;
1140
+ }
1127
1141
  /**
1128
1142
  * fetch the account entity
1129
1143
  * @param accountKey - lookup key to fetch cache type AccountEntity
@@ -1616,7 +1630,7 @@ class TokenCache {
1616
1630
 
1617
1631
  /* eslint-disable header/header */
1618
1632
  const name = "@azure/msal-node";
1619
- const version = "1.16.0";
1633
+ const version = "1.17.0";
1620
1634
 
1621
1635
  /*
1622
1636
  * Copyright (c) Microsoft Corporation. All rights reserved.