@azure/msal-node 1.0.0-beta.2 → 1.0.0-beta.6
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 +144 -0
- package/README.md +1 -1
- package/changelog.md +43 -1
- package/dist/cache/ITokenCache.d.ts +16 -0
- package/dist/cache/ITokenCache.d.ts.map +1 -0
- package/dist/cache/{Storage.d.ts → NodeStorage.d.ts} +55 -31
- package/dist/cache/NodeStorage.d.ts.map +1 -0
- package/dist/cache/TokenCache.d.ts +30 -13
- package/dist/cache/TokenCache.d.ts.map +1 -0
- package/dist/cache/serializer/Deserializer.d.ts +1 -0
- package/dist/cache/serializer/Deserializer.d.ts.map +1 -0
- package/dist/cache/serializer/Serializer.d.ts +1 -0
- package/dist/cache/serializer/Serializer.d.ts.map +1 -0
- package/dist/cache/serializer/SerializerTypes.d.ts +33 -0
- package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -0
- package/dist/client/ClientApplication.d.ts +36 -7
- package/dist/client/ClientApplication.d.ts.map +1 -0
- package/dist/client/ClientAssertion.d.ts +25 -1
- package/dist/client/ClientAssertion.d.ts.map +1 -0
- package/dist/client/ConfidentialClientApplication.d.ts +11 -5
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -0
- package/dist/client/IConfidentialClientApplication.d.ts +33 -0
- package/dist/client/IConfidentialClientApplication.d.ts.map +1 -0
- package/dist/client/IPublicClientApplication.d.ts +33 -0
- package/dist/client/IPublicClientApplication.d.ts.map +1 -0
- package/dist/client/PublicClientApplication.d.ts +8 -5
- package/dist/client/PublicClientApplication.d.ts.map +1 -0
- package/dist/config/Configuration.d.ts +10 -3
- package/dist/config/Configuration.d.ts.map +1 -0
- package/dist/crypto/CryptoProvider.d.ts +10 -2
- package/dist/crypto/CryptoProvider.d.ts.map +1 -0
- package/dist/crypto/GuidGenerator.d.ts +1 -0
- package/dist/crypto/GuidGenerator.d.ts.map +1 -0
- package/dist/crypto/PkceGenerator.d.ts +1 -0
- package/dist/crypto/PkceGenerator.d.ts.map +1 -0
- package/dist/index.d.ts +15 -5
- package/dist/index.d.ts.map +1 -0
- package/dist/msal-node.cjs.development.js +274 -205
- 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 +273 -204
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/network/HttpClient.d.ts +1 -1
- package/dist/network/HttpClient.d.ts.map +1 -0
- package/dist/packageMetadata.d.ts +3 -0
- package/dist/packageMetadata.d.ts.map +1 -0
- package/dist/request/AuthorizationCodeRequest.d.ts +3 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -0
- package/dist/request/AuthorizationUrlRequest.d.ts +3 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -0
- package/dist/request/ClientCredentialRequest.d.ts +3 -1
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -0
- package/dist/request/DeviceCodeRequest.d.ts +3 -1
- package/dist/request/DeviceCodeRequest.d.ts.map +1 -0
- package/dist/request/OnBehalfOfRequest.d.ts +3 -1
- package/dist/request/OnBehalfOfRequest.d.ts.map +1 -0
- package/dist/request/RefreshTokenRequest.d.ts +3 -1
- package/dist/request/RefreshTokenRequest.d.ts.map +1 -0
- package/dist/request/SilentFlowRequest.d.ts +3 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -0
- package/dist/request/UsernamePasswordRequest.d.ts +3 -1
- package/dist/request/UsernamePasswordRequest.d.ts.map +1 -0
- package/dist/utils/Constants.d.ts +1 -0
- package/dist/utils/Constants.d.ts.map +1 -0
- package/dist/utils/EncodingUtils.d.ts +1 -0
- package/dist/utils/EncodingUtils.d.ts.map +1 -0
- package/dist/utils/NetworkUtils.d.ts +1 -0
- package/dist/utils/NetworkUtils.d.ts.map +1 -0
- package/package.json +8 -12
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,150 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/msal-node",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Tue, 09 Feb 2021 01:48:22 GMT",
|
|
6
|
+
"tag": "@azure/msal-node_v1.0.0-beta.6",
|
|
7
|
+
"version": "1.0.0-beta.6",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Fix version.json import errors (#2993)",
|
|
12
|
+
"author": "thomas.norling@microsoft.com",
|
|
13
|
+
"commit": "6dc3bc9e2148bc53b181d9f079f6e11e0159620b",
|
|
14
|
+
"package": "@azure/msal-node"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"comment": "Ignore OIDC scopes during cache lookup or replacement (#2969)",
|
|
18
|
+
"author": "prkanher@microsoft.com",
|
|
19
|
+
"commit": "b113b562ffc33ad44b8d98417753db397256aadf",
|
|
20
|
+
"package": "@azure/msal-node"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"comment": "Set the validateStatus locally than globally for `axios` (#2959)",
|
|
24
|
+
"author": "sameera.gajjarapu@microsoft.com",
|
|
25
|
+
"commit": "55617cb8bc5289c29fd4357a16605b6720195cbc",
|
|
26
|
+
"package": "@azure/msal-node"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"comment": "Add API Extractor for msal-node",
|
|
30
|
+
"author": "sameera.gajjarapu@microsoft.com",
|
|
31
|
+
"commit": "01747296efdf08eefe585930097d9bbbf6b00789",
|
|
32
|
+
"package": "@azure/msal-node"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Tue, 02 Feb 2021 01:56:47 GMT",
|
|
39
|
+
"tag": "@azure/msal-node_v1.0.0-beta.5",
|
|
40
|
+
"version": "1.0.0-beta.5",
|
|
41
|
+
"comments": {
|
|
42
|
+
"none": [
|
|
43
|
+
{
|
|
44
|
+
"comment": "Typedocs Updates (#2926)",
|
|
45
|
+
"author": "thomas.norling@microsoft.com",
|
|
46
|
+
"commit": "3fd4a48143ed4fb62b9e3266338b1abda920d68a",
|
|
47
|
+
"package": "@azure/msal-node"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"comment": "Add project references (#2930)",
|
|
51
|
+
"author": "thomas.norling@microsoft.com",
|
|
52
|
+
"commit": "a836e77e372f1b4da28195d4ad8c0c75d6794875",
|
|
53
|
+
"package": "@azure/msal-node"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"comment": "Test updates (#2949)",
|
|
57
|
+
"author": "thomas.norling@microsoft.com",
|
|
58
|
+
"commit": "cbdd4cd8ba23b5794aeb1f0788b828f1248f7236",
|
|
59
|
+
"package": "@azure/msal-node"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"prerelease": [
|
|
63
|
+
{
|
|
64
|
+
"comment": "Get package version from version.json (#2915)",
|
|
65
|
+
"author": "thomas.norling@microsoft.com",
|
|
66
|
+
"commit": "a6f4702f9439e318a8cb6dc65d1def16351a84fd",
|
|
67
|
+
"package": "@azure/msal-node"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"comment": "Add interfaces to public APIs in msal-node (#2623)",
|
|
71
|
+
"author": "sameera.gajjarapu@microsoft.com",
|
|
72
|
+
"commit": "baa4aa037f90209006eb3fb1ba1263fd09690343",
|
|
73
|
+
"package": "@azure/msal-node"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"date": "Thu, 21 Jan 2021 21:48:01 GMT",
|
|
80
|
+
"tag": "@azure/msal-node_v1.0.0-beta.4",
|
|
81
|
+
"version": "1.0.0-beta.4",
|
|
82
|
+
"comments": {
|
|
83
|
+
"prerelease": [
|
|
84
|
+
{
|
|
85
|
+
"comment": "Authority metadata caching (#2758)",
|
|
86
|
+
"author": "thomas.norling@microsoft.com",
|
|
87
|
+
"commit": "28b3268b1385e99249c0b7a95b0b14299011ca46",
|
|
88
|
+
"package": "@azure/msal-node"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"date": "Tue, 12 Jan 2021 00:51:26 GMT",
|
|
95
|
+
"tag": "@azure/msal-node_v1.0.0-beta.3",
|
|
96
|
+
"version": "1.0.0-beta.3",
|
|
97
|
+
"comments": {
|
|
98
|
+
"prerelease": [
|
|
99
|
+
{
|
|
100
|
+
"comment": "ClientAssertion.parseCertificate - allow newlines in cert (#2721).",
|
|
101
|
+
"author": "email not defined",
|
|
102
|
+
"commit": "199c99ef23aeb013f8dcec94e3210332fbc42ed0",
|
|
103
|
+
"package": "@azure/msal-node"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"comment": "feat: bump up the axios version on msal-node",
|
|
107
|
+
"author": "samuel.kamau@microsoft.com",
|
|
108
|
+
"commit": "0d8e60f38340cb7b9a49dc3e0be28503105b5857",
|
|
109
|
+
"package": "@azure/msal-node"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"comment": "Add getKVStore to tokenCache (#2771)",
|
|
113
|
+
"author": "thomas.norling@microsoft.com",
|
|
114
|
+
"commit": "bb8ef90bcd20f111b903214c10429c1d507eafcf",
|
|
115
|
+
"package": "@azure/msal-node"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"none": [
|
|
119
|
+
{
|
|
120
|
+
"comment": "package-lock changes",
|
|
121
|
+
"author": "prkanher@microsoft.com",
|
|
122
|
+
"commit": "c092667cd997935625eafbc491ede54417d4b657",
|
|
123
|
+
"package": "@azure/msal-node"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"comment": "package.lock change",
|
|
127
|
+
"author": "samuel.kamau@microsoft.com",
|
|
128
|
+
"commit": "4e50ca592f5a17578072be9e4ac28e05b3e6d594",
|
|
129
|
+
"package": "@azure/msal-node"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"comment": "Fix npm audit warnings",
|
|
133
|
+
"author": "janutter@microsoft.com",
|
|
134
|
+
"commit": "751026cdaa24dd370c50ad714bf0b1d54c71fbde",
|
|
135
|
+
"package": "@azure/msal-node"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"patch": [
|
|
139
|
+
{
|
|
140
|
+
"comment": "change the code challenge encoding to uniform base64",
|
|
141
|
+
"author": "samuel.kamau@microsoft.com",
|
|
142
|
+
"commit": "c0cce3b6f6199bf0db5d77a07c557c8cdb4e383c",
|
|
143
|
+
"package": "@azure/msal-node"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
4
148
|
{
|
|
5
149
|
"date": "Mon, 07 Dec 2020 22:19:03 GMT",
|
|
6
150
|
"tag": "@azure/msal-node_v1.0.0-beta.2",
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@azure/msal-node/)[](https://nodei.co/npm/@azure/msal-node/)[](https://coveralls.io/github/AzureAD/microsoft-authentication-library-for-js?branch=dev)
|
|
4
4
|
|
|
5
|
-
| <a href="https://docs.microsoft.com/azure/active-directory/develop/guidedsetups/active-directory-javascriptspa" target="_blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/
|
|
5
|
+
| <a href="https://docs.microsoft.com/azure/active-directory/develop/guidedsetups/active-directory-javascriptspa" target="_blank">Getting Started</a> | <a href="https://aka.ms/aaddevv2" target="_blank">AAD Docs</a> | <a href="https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_node.html" target="_blank">Library Reference</a> |
|
|
6
6
|
| --- | --- | --- |
|
|
7
7
|
|
|
8
8
|
Currently `msal-node` is under development, please track the project progress [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/projects/4). This documentation is also in progress and will be changing as we release our `alpha` patches. **We do not recommend using this in a production environment yet**.
|
package/changelog.md
CHANGED
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
# Change Log - @azure/msal-node
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 09 Feb 2021 01:48:22 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.0.0-beta.6
|
|
8
|
+
|
|
9
|
+
Tue, 09 Feb 2021 01:48:22 GMT
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- Fix version.json import errors (#2993) (thomas.norling@microsoft.com)
|
|
14
|
+
- Ignore OIDC scopes during cache lookup or replacement (#2969) (prkanher@microsoft.com)
|
|
15
|
+
- Set the validateStatus locally than globally for `axios` (#2959) (sameera.gajjarapu@microsoft.com)
|
|
16
|
+
- Add API Extractor for msal-node (sameera.gajjarapu@microsoft.com)
|
|
17
|
+
|
|
18
|
+
## 1.0.0-beta.5
|
|
19
|
+
|
|
20
|
+
Tue, 02 Feb 2021 01:56:47 GMT
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- Get package version from version.json (#2915) (thomas.norling@microsoft.com)
|
|
25
|
+
- Add interfaces to public APIs in msal-node (#2623) (sameera.gajjarapu@microsoft.com)
|
|
26
|
+
|
|
27
|
+
## 1.0.0-beta.4
|
|
28
|
+
|
|
29
|
+
Thu, 21 Jan 2021 21:48:01 GMT
|
|
30
|
+
|
|
31
|
+
### Changes
|
|
32
|
+
|
|
33
|
+
- Authority metadata caching (#2758) (thomas.norling@microsoft.com)
|
|
34
|
+
|
|
35
|
+
## 1.0.0-beta.3
|
|
36
|
+
|
|
37
|
+
Tue, 12 Jan 2021 00:51:26 GMT
|
|
38
|
+
|
|
39
|
+
### Patches
|
|
40
|
+
|
|
41
|
+
- change the code challenge encoding to uniform base64 (samuel.kamau@microsoft.com)
|
|
42
|
+
|
|
43
|
+
### Changes
|
|
44
|
+
|
|
45
|
+
- ClientAssertion.parseCertificate - allow newlines in cert (#2721). (email not defined)
|
|
46
|
+
- feat: bump up the axios version on msal-node (samuel.kamau@microsoft.com)
|
|
47
|
+
- Add getKVStore to tokenCache (#2771) (thomas.norling@microsoft.com)
|
|
48
|
+
|
|
7
49
|
## 1.0.0-beta.2
|
|
8
50
|
|
|
9
51
|
Mon, 07 Dec 2020 22:19:03 GMT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AccountInfo } from "@azure/msal-common";
|
|
2
|
+
/**
|
|
3
|
+
* Token cache interface for the client, giving access to cache APIs
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface ITokenCache {
|
|
7
|
+
/** API that retrieves all accounts currently in cache to the user */
|
|
8
|
+
getAllAccounts(): Promise<AccountInfo[]>;
|
|
9
|
+
/** Returns the signed in account matching homeAccountId */
|
|
10
|
+
getAccountByHomeId(homeAccountId: string): Promise<AccountInfo | null>;
|
|
11
|
+
/** Returns the signed in account matching localAccountId */
|
|
12
|
+
getAccountByLocalId(localAccountId: string): Promise<AccountInfo | null>;
|
|
13
|
+
/** API to remove a specific account and the relevant data from cache */
|
|
14
|
+
removeAccount(account: AccountInfo): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ITokenCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITokenCache.d.ts","sourceRoot":"","sources":["../src/cache/ITokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAExB,qEAAqE;IACrE,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,2DAA2D;IAC3D,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEvE,4DAA4D;IAC5D,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEzE,wEAAwE;IACxE,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD"}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import { AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, ThrottlingEntity, CacheManager, Logger, ValidCacheType, ICrypto } from "@azure/msal-common";
|
|
1
|
+
import { AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, ThrottlingEntity, CacheManager, Logger, ValidCacheType, ICrypto, AuthorityMetadataEntity } from "@azure/msal-common";
|
|
2
2
|
import { InMemoryCache, JsonCache, CacheKVStore } from "./serializer/SerializerTypes";
|
|
3
3
|
/**
|
|
4
4
|
* This class implements Storage for node, reading cache from user specified storage location or an extension library
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
|
-
export declare class
|
|
7
|
+
export declare class NodeStorage extends CacheManager {
|
|
7
8
|
private logger;
|
|
8
9
|
private cache;
|
|
9
10
|
private changeEmitters;
|
|
10
11
|
constructor(logger: Logger, clientId: string, cryptoImpl: ICrypto);
|
|
12
|
+
/**
|
|
13
|
+
* Queue up callbacks
|
|
14
|
+
* @param func - a callback function for cache change indication
|
|
15
|
+
*/
|
|
11
16
|
registerChangeEmitter(func: () => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* Invoke the callback when cache changes
|
|
19
|
+
*/
|
|
12
20
|
emitChange(): void;
|
|
13
21
|
/**
|
|
14
22
|
* Converts cacheKVStore to InMemoryCache
|
|
15
|
-
* @param cache
|
|
23
|
+
* @param cache - key value store
|
|
16
24
|
*/
|
|
17
25
|
cacheToInMemoryCache(cache: CacheKVStore): InMemoryCache;
|
|
18
26
|
/**
|
|
19
27
|
* converts inMemoryCache to CacheKVStore
|
|
20
|
-
* @param inMemoryCache
|
|
28
|
+
* @param inMemoryCache - kvstore map for inmemory
|
|
21
29
|
*/
|
|
22
30
|
inMemoryCacheToCache(inMemoryCache: InMemoryCache): CacheKVStore;
|
|
23
31
|
/**
|
|
@@ -26,7 +34,7 @@ export declare class Storage extends CacheManager {
|
|
|
26
34
|
getInMemoryCache(): InMemoryCache;
|
|
27
35
|
/**
|
|
28
36
|
* sets the current in memory cache for the client
|
|
29
|
-
* @param inMemoryCache
|
|
37
|
+
* @param inMemoryCache - key value map in memory
|
|
30
38
|
*/
|
|
31
39
|
setInMemoryCache(inMemoryCache: InMemoryCache): void;
|
|
32
40
|
/**
|
|
@@ -35,101 +43,116 @@ export declare class Storage extends CacheManager {
|
|
|
35
43
|
getCache(): CacheKVStore;
|
|
36
44
|
/**
|
|
37
45
|
* sets the current cache (key value store)
|
|
38
|
-
* @param cacheMap
|
|
46
|
+
* @param cacheMap - key value map
|
|
39
47
|
*/
|
|
40
48
|
setCache(cache: CacheKVStore): void;
|
|
41
49
|
/**
|
|
42
50
|
* Gets cache item with given key.
|
|
43
|
-
* @param key
|
|
51
|
+
* @param key - lookup key for the cache entry
|
|
44
52
|
*/
|
|
45
53
|
getItem(key: string): ValidCacheType;
|
|
46
54
|
/**
|
|
47
|
-
* Gets cache item with given
|
|
48
|
-
* @param key
|
|
49
|
-
* @param value
|
|
55
|
+
* Gets cache item with given key-value
|
|
56
|
+
* @param key - lookup key for the cache entry
|
|
57
|
+
* @param value - value of the cache entry
|
|
50
58
|
*/
|
|
51
59
|
setItem(key: string, value: ValidCacheType): void;
|
|
52
60
|
/**
|
|
53
61
|
* fetch the account entity
|
|
54
|
-
* @param accountKey
|
|
62
|
+
* @param accountKey - lookup key to fetch cache type AccountEntity
|
|
55
63
|
*/
|
|
56
64
|
getAccount(accountKey: string): AccountEntity | null;
|
|
57
65
|
/**
|
|
58
66
|
* set account entity
|
|
59
|
-
* @param account
|
|
67
|
+
* @param account - cache value to be set of type AccountEntity
|
|
60
68
|
*/
|
|
61
69
|
setAccount(account: AccountEntity): void;
|
|
62
70
|
/**
|
|
63
71
|
* fetch the idToken credential
|
|
64
|
-
* @param idTokenKey
|
|
72
|
+
* @param idTokenKey - lookup key to fetch cache type IdTokenEntity
|
|
65
73
|
*/
|
|
66
74
|
getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
|
|
67
75
|
/**
|
|
68
76
|
* set idToken credential
|
|
69
|
-
* @param idToken
|
|
77
|
+
* @param idToken - cache value to be set of type IdTokenEntity
|
|
70
78
|
*/
|
|
71
79
|
setIdTokenCredential(idToken: IdTokenEntity): void;
|
|
72
80
|
/**
|
|
73
81
|
* fetch the accessToken credential
|
|
74
|
-
* @param accessTokenKey
|
|
82
|
+
* @param accessTokenKey - lookup key to fetch cache type AccessTokenEntity
|
|
75
83
|
*/
|
|
76
84
|
getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
|
|
77
85
|
/**
|
|
78
86
|
* set accessToken credential
|
|
79
|
-
* @param accessToken
|
|
87
|
+
* @param accessToken - cache value to be set of type AccessTokenEntity
|
|
80
88
|
*/
|
|
81
89
|
setAccessTokenCredential(accessToken: AccessTokenEntity): void;
|
|
82
90
|
/**
|
|
83
91
|
* fetch the refreshToken credential
|
|
84
|
-
* @param refreshTokenKey
|
|
92
|
+
* @param refreshTokenKey - lookup key to fetch cache type RefreshTokenEntity
|
|
85
93
|
*/
|
|
86
94
|
getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
|
|
87
95
|
/**
|
|
88
96
|
* set refreshToken credential
|
|
89
|
-
* @param refreshToken
|
|
97
|
+
* @param refreshToken - cache value to be set of type RefreshTokenEntity
|
|
90
98
|
*/
|
|
91
99
|
setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
|
|
92
100
|
/**
|
|
93
101
|
* fetch appMetadata entity from the platform cache
|
|
94
|
-
* @param appMetadataKey
|
|
102
|
+
* @param appMetadataKey - lookup key to fetch cache type AppMetadataEntity
|
|
95
103
|
*/
|
|
96
104
|
getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
|
|
97
105
|
/**
|
|
98
106
|
* set appMetadata entity to the platform cache
|
|
99
|
-
* @param appMetadata
|
|
107
|
+
* @param appMetadata - cache value to be set of type AppMetadataEntity
|
|
100
108
|
*/
|
|
101
109
|
setAppMetadata(appMetadata: AppMetadataEntity): void;
|
|
102
110
|
/**
|
|
103
111
|
* fetch server telemetry entity from the platform cache
|
|
104
|
-
* @param serverTelemetrykey
|
|
112
|
+
* @param serverTelemetrykey - lookup key to fetch cache type ServerTelemetryEntity
|
|
105
113
|
*/
|
|
106
114
|
getServerTelemetry(serverTelemetrykey: string): ServerTelemetryEntity | null;
|
|
107
115
|
/**
|
|
108
116
|
* set server telemetry entity to the platform cache
|
|
109
|
-
* @param serverTelemetryKey
|
|
110
|
-
* @param serverTelemetry
|
|
117
|
+
* @param serverTelemetryKey - lookup key to fetch cache type ServerTelemetryEntity
|
|
118
|
+
* @param serverTelemetry - cache value to be set of type ServerTelemetryEntity
|
|
111
119
|
*/
|
|
112
120
|
setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
|
|
121
|
+
/**
|
|
122
|
+
* fetch authority metadata entity from the platform cache
|
|
123
|
+
* @param key - lookup key to fetch cache type AuthorityMetadataEntity
|
|
124
|
+
*/
|
|
125
|
+
getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
|
|
126
|
+
/**
|
|
127
|
+
* Get all authority metadata keys
|
|
128
|
+
*/
|
|
129
|
+
getAuthorityMetadataKeys(): Array<string>;
|
|
130
|
+
/**
|
|
131
|
+
* set authority metadata entity to the platform cache
|
|
132
|
+
* @param key - lookup key to fetch cache type AuthorityMetadataEntity
|
|
133
|
+
* @param metadata - cache value to be set of type AuthorityMetadataEntity
|
|
134
|
+
*/
|
|
135
|
+
setAuthorityMetadata(key: string, metadata: AuthorityMetadataEntity): void;
|
|
113
136
|
/**
|
|
114
137
|
* fetch throttling entity from the platform cache
|
|
115
|
-
* @param throttlingCacheKey
|
|
138
|
+
* @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity
|
|
116
139
|
*/
|
|
117
140
|
getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
|
|
118
141
|
/**
|
|
119
142
|
* set throttling entity to the platform cache
|
|
120
|
-
* @param throttlingCacheKey
|
|
121
|
-
* @param throttlingCache
|
|
143
|
+
* @param throttlingCacheKey - lookup key to fetch cache type ThrottlingEntity
|
|
144
|
+
* @param throttlingCache - cache value to be set of type ThrottlingEntity
|
|
122
145
|
*/
|
|
123
146
|
setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
|
|
124
147
|
/**
|
|
125
148
|
* Removes the cache item from memory with the given key.
|
|
126
|
-
* @param key
|
|
127
|
-
* @param inMemory
|
|
149
|
+
* @param key - lookup key to remove a cache entity
|
|
150
|
+
* @param inMemory - key value map of the cache
|
|
128
151
|
*/
|
|
129
152
|
removeItem(key: string): boolean;
|
|
130
153
|
/**
|
|
131
154
|
* Checks whether key is in cache.
|
|
132
|
-
* @param key
|
|
155
|
+
* @param key - look up key for a cache entity
|
|
133
156
|
*/
|
|
134
157
|
containsKey(key: string): boolean;
|
|
135
158
|
/**
|
|
@@ -142,12 +165,13 @@ export declare class Storage extends CacheManager {
|
|
|
142
165
|
clear(): void;
|
|
143
166
|
/**
|
|
144
167
|
* Initialize in memory cache from an exisiting cache vault
|
|
145
|
-
* @param cache
|
|
168
|
+
* @param cache - blob formatted cache (JSON)
|
|
146
169
|
*/
|
|
147
170
|
static generateInMemoryCache(cache: string): InMemoryCache;
|
|
148
171
|
/**
|
|
149
172
|
* retrieves the final JSON
|
|
150
|
-
* @param inMemoryCache
|
|
173
|
+
* @param inMemoryCache - itemised cache read from the JSON
|
|
151
174
|
*/
|
|
152
175
|
static generateJsonCache(inMemoryCache: InMemoryCache): JsonCache;
|
|
153
176
|
}
|
|
177
|
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AAC,kBAAkB,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,GAAG,IAAI;IAIvF;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAoBhC;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC;;OAEG;IACH,OAAO,IAAI,MAAM,EAAE;IAQnB;;OAEG;IACH,KAAK,IAAI,IAAI;IAab;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAM1D;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS;CAGpE"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NodeStorage } from "./NodeStorage";
|
|
2
2
|
import { AccountInfo, Logger, ISerializableTokenCache, ICachePlugin } from "@azure/msal-common";
|
|
3
|
+
import { CacheKVStore } from "./serializer/SerializerTypes";
|
|
4
|
+
import { ITokenCache } from "./ITokenCache";
|
|
3
5
|
/**
|
|
4
6
|
* In-memory token cache manager
|
|
7
|
+
* @public
|
|
5
8
|
*/
|
|
6
|
-
export declare class TokenCache implements ISerializableTokenCache {
|
|
9
|
+
export declare class TokenCache implements ISerializableTokenCache, ITokenCache {
|
|
7
10
|
private storage;
|
|
8
11
|
private cacheHasChanged;
|
|
9
12
|
private cacheSnapshot;
|
|
10
13
|
private readonly persistence;
|
|
11
14
|
private logger;
|
|
12
|
-
constructor(storage:
|
|
15
|
+
constructor(storage: NodeStorage, logger: Logger, cachePlugin?: ICachePlugin);
|
|
13
16
|
/**
|
|
14
17
|
* Set to true if cache state has changed since last time serialize or writeToPersistence was called
|
|
15
18
|
*/
|
|
@@ -20,9 +23,13 @@ export declare class TokenCache implements ISerializableTokenCache {
|
|
|
20
23
|
serialize(): string;
|
|
21
24
|
/**
|
|
22
25
|
* Deserializes JSON to in-memory cache. JSON should be in MSAL cache schema format
|
|
23
|
-
* @param cache
|
|
26
|
+
* @param cache - blob formatted cache
|
|
24
27
|
*/
|
|
25
28
|
deserialize(cache: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Fetches the cache key-value map
|
|
31
|
+
*/
|
|
32
|
+
getKVStore(): CacheKVStore;
|
|
26
33
|
/**
|
|
27
34
|
* API that retrieves all accounts currently in cache to the user
|
|
28
35
|
*/
|
|
@@ -31,19 +38,19 @@ export declare class TokenCache implements ISerializableTokenCache {
|
|
|
31
38
|
* Returns the signed in account matching homeAccountId.
|
|
32
39
|
* (the account object is created at the time of successful login)
|
|
33
40
|
* or null when no matching account is found
|
|
34
|
-
* @
|
|
41
|
+
* @param homeAccountId - unique identifier for an account (uid.utid)
|
|
35
42
|
*/
|
|
36
43
|
getAccountByHomeId(homeAccountId: string): Promise<AccountInfo | null>;
|
|
37
44
|
/**
|
|
38
45
|
* Returns the signed in account matching localAccountId.
|
|
39
46
|
* (the account object is created at the time of successful login)
|
|
40
47
|
* or null when no matching account is found
|
|
41
|
-
* @
|
|
48
|
+
* @param localAccountId - unique identifier of an account (sub/obj when homeAccountId cannot be populated)
|
|
42
49
|
*/
|
|
43
50
|
getAccountByLocalId(localAccountId: string): Promise<AccountInfo | null>;
|
|
44
51
|
/**
|
|
45
52
|
* API to remove a specific account and the relevant data from cache
|
|
46
|
-
* @param account
|
|
53
|
+
* @param account - AccountInfo passed by the user
|
|
47
54
|
*/
|
|
48
55
|
removeAccount(account: AccountInfo): Promise<void>;
|
|
49
56
|
/**
|
|
@@ -52,23 +59,33 @@ export declare class TokenCache implements ISerializableTokenCache {
|
|
|
52
59
|
private handleChangeEvent;
|
|
53
60
|
/**
|
|
54
61
|
* Merge in memory cache with the cache snapshot.
|
|
55
|
-
* @param oldState
|
|
56
|
-
* @param currentState
|
|
62
|
+
* @param oldState - cache before changes
|
|
63
|
+
* @param currentState - current cache state in the library
|
|
57
64
|
*/
|
|
58
65
|
private mergeState;
|
|
59
66
|
/**
|
|
60
67
|
* Deep update of oldState based on newState values
|
|
61
|
-
* @param oldState
|
|
62
|
-
* @param newState
|
|
68
|
+
* @param oldState - cache before changes
|
|
69
|
+
* @param newState - updated cache
|
|
63
70
|
*/
|
|
64
71
|
private mergeUpdates;
|
|
65
72
|
/**
|
|
66
73
|
* Removes entities in oldState that the were removed from newState. If there are any unknown values in root of
|
|
67
74
|
* oldState that are not recognized, they are left untouched.
|
|
68
|
-
* @param oldState
|
|
69
|
-
* @param newState
|
|
75
|
+
* @param oldState - cache before changes
|
|
76
|
+
* @param newState - updated cache
|
|
70
77
|
*/
|
|
71
78
|
private mergeRemovals;
|
|
79
|
+
/**
|
|
80
|
+
* Helper to merge new cache with the old one
|
|
81
|
+
* @param oldState - cache before changes
|
|
82
|
+
* @param newState - updated cache
|
|
83
|
+
*/
|
|
72
84
|
private mergeRemovalsDict;
|
|
85
|
+
/**
|
|
86
|
+
* Helper to overlay as a part of cache merge
|
|
87
|
+
* @param passedInCache - cache read from the blob
|
|
88
|
+
*/
|
|
73
89
|
private overlayDefaults;
|
|
74
90
|
}
|
|
91
|
+
//# sourceMappingURL=TokenCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenCache.d.ts","sourceRoot":"","sources":["../src/cache/TokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAA8B,WAAW,EAAE,MAAM,EAAE,uBAAuB,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAsK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGhO,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C;;;GAGG;AACH,qBAAa,UAAW,YAAW,uBAAuB,EAAE,WAAW;IAEnE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAA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IjD;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IAqBzF;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC;IAiBzF;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAwBpG;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAmBvG;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAcrG;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,GAAG,SAAS;CASjE"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { AccountCache, IdTokenCache, AccessTokenCache, RefreshTokenCache, AppMetadataCache, ValidCacheType } from "@azure/msal-common";
|
|
2
|
+
/**
|
|
3
|
+
* Key value store for in-memory cache
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
2
6
|
export declare type CacheKVStore = Record<string, ValidCacheType>;
|
|
7
|
+
/**
|
|
8
|
+
* Cache format read from the cache blob provided to the configuration during app instantiation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
3
11
|
export declare type JsonCache = {
|
|
4
12
|
Account: Record<string, SerializedAccountEntity>;
|
|
5
13
|
IdToken: Record<string, SerializedIdTokenEntity>;
|
|
@@ -7,6 +15,10 @@ export declare type JsonCache = {
|
|
|
7
15
|
RefreshToken: Record<string, SerializedRefreshTokenEntity>;
|
|
8
16
|
AppMetadata: Record<string, SerializedAppMetadataEntity>;
|
|
9
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Intermittent type to handle in-memory data objects with defined types
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
10
22
|
export declare type InMemoryCache = {
|
|
11
23
|
accounts: AccountCache;
|
|
12
24
|
idTokens: IdTokenCache;
|
|
@@ -14,6 +26,10 @@ export declare type InMemoryCache = {
|
|
|
14
26
|
refreshTokens: RefreshTokenCache;
|
|
15
27
|
appMetadata: AppMetadataCache;
|
|
16
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Account type
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
17
33
|
export declare type SerializedAccountEntity = {
|
|
18
34
|
home_account_id: string;
|
|
19
35
|
environment: string;
|
|
@@ -26,6 +42,10 @@ export declare type SerializedAccountEntity = {
|
|
|
26
42
|
last_modification_time?: string;
|
|
27
43
|
last_modification_app?: string;
|
|
28
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Idtoken credential type
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
29
49
|
export declare type SerializedIdTokenEntity = {
|
|
30
50
|
home_account_id: string;
|
|
31
51
|
environment: string;
|
|
@@ -34,6 +54,10 @@ export declare type SerializedIdTokenEntity = {
|
|
|
34
54
|
secret: string;
|
|
35
55
|
realm: string;
|
|
36
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Access token credential type
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
37
61
|
export declare type SerializedAccessTokenEntity = {
|
|
38
62
|
home_account_id: string;
|
|
39
63
|
environment: string;
|
|
@@ -49,6 +73,10 @@ export declare type SerializedAccessTokenEntity = {
|
|
|
49
73
|
key_id?: string;
|
|
50
74
|
token_type?: string;
|
|
51
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Refresh token credential type
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
52
80
|
export declare type SerializedRefreshTokenEntity = {
|
|
53
81
|
home_account_id: string;
|
|
54
82
|
environment: string;
|
|
@@ -59,8 +87,13 @@ export declare type SerializedRefreshTokenEntity = {
|
|
|
59
87
|
target?: string;
|
|
60
88
|
realm?: string;
|
|
61
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* AppMetadata type
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
62
94
|
export declare type SerializedAppMetadataEntity = {
|
|
63
95
|
client_id: string;
|
|
64
96
|
environment: string;
|
|
65
97
|
family_id?: string;
|
|
66
98
|
};
|
|
99
|
+
//# sourceMappingURL=SerializerTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SerializerTypes.d.ts","sourceRoot":"","sources":["../../src/cache/serializer/SerializerTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvI;;;GAGG;AACH,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE1D;;;GAGG;AACH,oBAAY,SAAS,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IACzD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;CAC5D,CAAC;AAEF;;;GAGG;AACH,oBAAY,aAAa,GAAG;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,aAAa,EAAE,iBAAiB,CAAC;IACjC,WAAW,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,oBAAY,uBAAuB,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