@azure/msal-common 6.0.0 → 6.3.0-beta.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.
Files changed (188) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/_virtual/_tslib.js +1 -1
  4. package/dist/account/AccountInfo.d.ts +6 -1
  5. package/dist/account/AccountInfo.d.ts.map +1 -1
  6. package/dist/account/AuthToken.js +1 -1
  7. package/dist/account/AuthToken.js.map +1 -1
  8. package/dist/account/CcsCredential.js +1 -1
  9. package/dist/account/CcsCredential.js.map +1 -1
  10. package/dist/account/ClientInfo.js +1 -1
  11. package/dist/account/ClientInfo.js.map +1 -1
  12. package/dist/account/TokenClaims.d.ts +30 -0
  13. package/dist/account/TokenClaims.d.ts.map +1 -1
  14. package/dist/authority/Authority.d.ts +9 -1
  15. package/dist/authority/Authority.d.ts.map +1 -1
  16. package/dist/authority/Authority.js +36 -11
  17. package/dist/authority/Authority.js.map +1 -1
  18. package/dist/authority/AuthorityFactory.d.ts +2 -2
  19. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  20. package/dist/authority/AuthorityFactory.js +5 -5
  21. package/dist/authority/AuthorityFactory.js.map +1 -1
  22. package/dist/authority/AuthorityOptions.d.ts +8 -0
  23. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  24. package/dist/authority/AuthorityOptions.js +24 -0
  25. package/dist/authority/AuthorityOptions.js.map +1 -0
  26. package/dist/authority/AuthorityType.js +1 -1
  27. package/dist/authority/AuthorityType.js.map +1 -1
  28. package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
  29. package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -1
  30. package/dist/authority/ImdsOptions.d.ts +7 -0
  31. package/dist/authority/ImdsOptions.d.ts.map +1 -0
  32. package/dist/authority/OpenIdConfigResponse.js +1 -1
  33. package/dist/authority/OpenIdConfigResponse.js.map +1 -1
  34. package/dist/authority/ProtocolMode.js +1 -1
  35. package/dist/authority/ProtocolMode.js.map +1 -1
  36. package/dist/authority/RegionDiscovery.d.ts +3 -6
  37. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  38. package/dist/authority/RegionDiscovery.js +19 -11
  39. package/dist/authority/RegionDiscovery.js.map +1 -1
  40. package/dist/cache/CacheManager.d.ts +1 -1
  41. package/dist/cache/CacheManager.js +3 -3
  42. package/dist/cache/CacheManager.js.map +1 -1
  43. package/dist/cache/entities/AccessTokenEntity.js +1 -1
  44. package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
  45. package/dist/cache/entities/AccountEntity.d.ts +3 -1
  46. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  47. package/dist/cache/entities/AccountEntity.js +16 -12
  48. package/dist/cache/entities/AccountEntity.js.map +1 -1
  49. package/dist/cache/entities/AppMetadataEntity.js +1 -1
  50. package/dist/cache/entities/AppMetadataEntity.js.map +1 -1
  51. package/dist/cache/entities/AuthorityMetadataEntity.js +1 -1
  52. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
  53. package/dist/cache/entities/CacheRecord.js +1 -1
  54. package/dist/cache/entities/CacheRecord.js.map +1 -1
  55. package/dist/cache/entities/CredentialEntity.js +5 -5
  56. package/dist/cache/entities/CredentialEntity.js.map +1 -1
  57. package/dist/cache/entities/IdTokenEntity.js +1 -1
  58. package/dist/cache/entities/IdTokenEntity.js.map +1 -1
  59. package/dist/cache/entities/RefreshTokenEntity.js +1 -1
  60. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -1
  61. package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
  62. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -1
  63. package/dist/cache/entities/ThrottlingEntity.js +1 -1
  64. package/dist/cache/entities/ThrottlingEntity.js.map +1 -1
  65. package/dist/cache/persistence/TokenCacheContext.js +1 -1
  66. package/dist/cache/persistence/TokenCacheContext.js.map +1 -1
  67. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  68. package/dist/client/AuthorizationCodeClient.js +122 -93
  69. package/dist/client/AuthorizationCodeClient.js.map +1 -1
  70. package/dist/client/BaseClient.js +2 -2
  71. package/dist/client/BaseClient.js.map +1 -1
  72. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  73. package/dist/client/ClientCredentialClient.js +4 -3
  74. package/dist/client/ClientCredentialClient.js.map +1 -1
  75. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  76. package/dist/client/DeviceCodeClient.js +4 -2
  77. package/dist/client/DeviceCodeClient.js.map +1 -1
  78. package/dist/client/OnBehalfOfClient.js +3 -2
  79. package/dist/client/OnBehalfOfClient.js.map +1 -1
  80. package/dist/client/RefreshTokenClient.js +2 -1
  81. package/dist/client/RefreshTokenClient.js.map +1 -1
  82. package/dist/client/SilentFlowClient.js +1 -1
  83. package/dist/client/SilentFlowClient.js.map +1 -1
  84. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  85. package/dist/client/UsernamePasswordClient.js +3 -1
  86. package/dist/client/UsernamePasswordClient.js.map +1 -1
  87. package/dist/config/ClientConfiguration.d.ts +29 -1
  88. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  89. package/dist/config/ClientConfiguration.js +21 -8
  90. package/dist/config/ClientConfiguration.js.map +1 -1
  91. package/dist/crypto/ICrypto.d.ts +4 -2
  92. package/dist/crypto/ICrypto.d.ts.map +1 -1
  93. package/dist/crypto/ICrypto.js +1 -1
  94. package/dist/crypto/ICrypto.js.map +1 -1
  95. package/dist/crypto/IGuidGenerator.d.ts +5 -0
  96. package/dist/crypto/IGuidGenerator.d.ts.map +1 -0
  97. package/dist/crypto/PopTokenGenerator.d.ts +30 -0
  98. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  99. package/dist/crypto/PopTokenGenerator.js +38 -2
  100. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  101. package/dist/error/AuthError.js +3 -3
  102. package/dist/error/AuthError.js.map +1 -1
  103. package/dist/error/ClientAuthError.js +1 -1
  104. package/dist/error/ClientAuthError.js.map +1 -1
  105. package/dist/error/ClientConfigurationError.d.ts +11 -0
  106. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  107. package/dist/error/ClientConfigurationError.js +12 -2
  108. package/dist/error/ClientConfigurationError.js.map +1 -1
  109. package/dist/error/InteractionRequiredAuthError.js +1 -1
  110. package/dist/error/InteractionRequiredAuthError.js.map +1 -1
  111. package/dist/error/ServerError.js +1 -1
  112. package/dist/error/ServerError.js.map +1 -1
  113. package/dist/index.cjs.js +764 -176
  114. package/dist/index.cjs.js.map +1 -1
  115. package/dist/index.d.ts +8 -2
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +5 -1
  118. package/dist/index.js.map +1 -1
  119. package/dist/logger/Logger.js +13 -13
  120. package/dist/logger/Logger.js.map +1 -1
  121. package/dist/network/INetworkModule.d.ts +1 -0
  122. package/dist/network/INetworkModule.d.ts.map +1 -1
  123. package/dist/network/INetworkModule.js +1 -1
  124. package/dist/network/INetworkModule.js.map +1 -1
  125. package/dist/network/NetworkManager.js +1 -1
  126. package/dist/network/NetworkManager.js.map +1 -1
  127. package/dist/network/ThrottlingUtils.js +1 -1
  128. package/dist/network/ThrottlingUtils.js.map +1 -1
  129. package/dist/packageMetadata.d.ts +1 -1
  130. package/dist/packageMetadata.d.ts.map +1 -1
  131. package/dist/packageMetadata.js +2 -2
  132. package/dist/packageMetadata.js.map +1 -1
  133. package/dist/request/AuthenticationHeaderParser.js +3 -3
  134. package/dist/request/AuthenticationHeaderParser.js.map +1 -1
  135. package/dist/request/BaseAuthRequest.d.ts +8 -5
  136. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  137. package/dist/request/CommonAuthorizationUrlRequest.d.ts +1 -0
  138. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  139. package/dist/request/CommonEndSessionRequest.d.ts +2 -0
  140. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  141. package/dist/request/RequestParameterBuilder.d.ts +18 -1
  142. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  143. package/dist/request/RequestParameterBuilder.js +37 -3
  144. package/dist/request/RequestParameterBuilder.js.map +1 -1
  145. package/dist/request/RequestValidator.js +1 -1
  146. package/dist/request/RequestValidator.js.map +1 -1
  147. package/dist/request/ScopeSet.js +4 -4
  148. package/dist/request/ScopeSet.js.map +1 -1
  149. package/dist/response/AuthenticationResult.d.ts +1 -0
  150. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  151. package/dist/response/ResponseHandler.d.ts.map +1 -1
  152. package/dist/response/ResponseHandler.js +6 -5
  153. package/dist/response/ResponseHandler.js.map +1 -1
  154. package/dist/response/ServerAuthorizationCodeResponse.d.ts +1 -0
  155. package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -1
  156. package/dist/telemetry/performance/IPerformanceClient.d.ts +22 -0
  157. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  158. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  159. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  160. package/dist/telemetry/performance/PerformanceClient.d.ts +125 -0
  161. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  162. package/dist/telemetry/performance/PerformanceClient.js +275 -0
  163. package/dist/telemetry/performance/PerformanceClient.js.map +1 -0
  164. package/dist/telemetry/performance/PerformanceEvent.d.ts +203 -0
  165. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  166. package/dist/telemetry/performance/PerformanceEvent.js +100 -0
  167. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
  168. package/dist/telemetry/performance/StubPerformanceClient.d.ts +13 -0
  169. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  170. package/dist/telemetry/performance/StubPerformanceClient.js +37 -0
  171. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
  172. package/dist/telemetry/server/ServerTelemetryManager.js +4 -4
  173. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
  174. package/dist/url/UrlString.js +2 -2
  175. package/dist/url/UrlString.js.map +1 -1
  176. package/dist/utils/Constants.d.ts +8 -1
  177. package/dist/utils/Constants.d.ts.map +1 -1
  178. package/dist/utils/Constants.js +9 -2
  179. package/dist/utils/Constants.js.map +1 -1
  180. package/dist/utils/ProtocolUtils.js +3 -3
  181. package/dist/utils/ProtocolUtils.js.map +1 -1
  182. package/dist/utils/StringUtils.js +1 -1
  183. package/dist/utils/StringUtils.js.map +1 -1
  184. package/dist/utils/TimeUtils.js +1 -1
  185. package/dist/utils/TimeUtils.js.map +1 -1
  186. package/package.json +74 -76
  187. package/CHANGELOG.json +0 -1282
  188. package/CHANGELOG.md +0 -491
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
package/README.md CHANGED
@@ -1,62 +1,62 @@
1
- # Microsoft Authentication Library for JavaScript (MSAL.js) Common Protocols Package
2
-
3
- [![npm version](https://img.shields.io/npm/v/@azure/msal-common.svg?style=flat)](https://www.npmjs.com/package/@azure/msal-common/)
4
- [![npm version](https://img.shields.io/npm/dm/@azure/msal-common.svg)](https://nodei.co/npm/@azure/msal-common/)
5
- [![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-common)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
6
-
7
- | <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_common.html" target="_blank">Library Reference</a> |
8
- | --- | --- | --- |
9
-
10
- 1. [About](#about)
11
- 2. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md)
12
- 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/CHANGELOG.md)
13
- 1. [Releases](#releases)
14
- 1. [Prerequisites and Usage](#prerequisites-and-usage)
15
- 1. [Installation](#installation)
16
- 1. [Security Reporting](#security-reporting)
17
- 1. [License](#license)
18
- 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
19
-
20
- ## About
21
-
22
- The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io).
23
-
24
- The `@azure/msal-common` package described by the code in this folder serves as a common package dependency for the `@azure/msal-browser` package (and in the future, the msal-node package). Be aware that this is an internal library, and is subject to frequent change. **It is not meant for production consumption by itself.**
25
-
26
- ## FAQ
27
-
28
- See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md).
29
-
30
- ## Releases
31
-
32
- *Expect us to detail our major and minor releases moving forward, while leaving out our patch releases. Patch release notes can be found in our change log.*
33
-
34
- | Date | Release | Announcement | Main features |
35
- | ------| ------- | ---------| --------- |
36
- | August 4, 2020 | @azure/msal-common v1.1.0 | [Release Notes](https://https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.1.0)
37
- | July 20, 2020 | @azure/msal-common v1.0.0 | [Release Notes](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.0.0) | Full release version of the `@azure/msal-common` |
38
- | May 11, 2020 | @azure/msal-common v1.0.0-beta | Beta version of the `@azure/msal-common` package |
39
- | January 17, 2020 | @azure/msal-common v1.0.0-alpha | No release notes yet | Alpha version of the `@azure/msal-common` package with authorization code flow for SPAs working in dev. |
40
-
41
- ## Prerequisites and Usage
42
- This library is not meant for production use. Please use one of these packages specific to the platform you are developing for:
43
-
44
- - [MSAL for Single Page Applications (SPAs)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser)
45
- - [MSAL for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node)
46
-
47
- ## Installation
48
- ### Via NPM:
49
-
50
- npm install @azure/msal-common
51
-
52
- ## Security Reporting
53
-
54
- If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.
55
-
56
- ## License
57
-
58
- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License");
59
-
60
- ## We Value and Adhere to the Microsoft Open Source Code of Conduct
61
-
62
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
1
+ # Microsoft Authentication Library for JavaScript (MSAL.js) Common Protocols Package
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@azure/msal-common.svg?style=flat)](https://www.npmjs.com/package/@azure/msal-common/)
4
+ [![npm version](https://img.shields.io/npm/dm/@azure/msal-common.svg)](https://nodei.co/npm/@azure/msal-common/)
5
+ [![codecov](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js/branch/dev/graph/badge.svg?flag=msal-common)](https://codecov.io/gh/AzureAD/microsoft-authentication-library-for-js)
6
+
7
+ | <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_common.html" target="_blank">Library Reference</a> |
8
+ | --- | --- | --- |
9
+
10
+ 1. [About](#about)
11
+ 2. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md)
12
+ 1. [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/CHANGELOG.md)
13
+ 1. [Releases](#releases)
14
+ 1. [Prerequisites and Usage](#prerequisites-and-usage)
15
+ 1. [Installation](#installation)
16
+ 1. [Security Reporting](#security-reporting)
17
+ 1. [License](#license)
18
+ 1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
19
+
20
+ ## About
21
+
22
+ The MSAL library for JavaScript enables client-side JavaScript applications to authenticate users using [Azure AD](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview) work and school accounts (AAD), Microsoft personal accounts (MSA) and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io).
23
+
24
+ The `@azure/msal-common` package described by the code in this folder serves as a common package dependency for the `@azure/msal-browser` package (and in the future, the msal-node package). Be aware that this is an internal library, and is subject to frequent change. **It is not meant for production consumption by itself.**
25
+
26
+ ## FAQ
27
+
28
+ See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md).
29
+
30
+ ## Releases
31
+
32
+ *Expect us to detail our major and minor releases moving forward, while leaving out our patch releases. Patch release notes can be found in our change log.*
33
+
34
+ | Date | Release | Announcement | Main features |
35
+ | ------| ------- | ---------| --------- |
36
+ | August 4, 2020 | @azure/msal-common v1.1.0 | [Release Notes](https://https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.1.0)
37
+ | July 20, 2020 | @azure/msal-common v1.0.0 | [Release Notes](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases/tag/msal-common-v1.0.0) | Full release version of the `@azure/msal-common` |
38
+ | May 11, 2020 | @azure/msal-common v1.0.0-beta | Beta version of the `@azure/msal-common` package |
39
+ | January 17, 2020 | @azure/msal-common v1.0.0-alpha | No release notes yet | Alpha version of the `@azure/msal-common` package with authorization code flow for SPAs working in dev. |
40
+
41
+ ## Prerequisites and Usage
42
+ This library is not meant for production use. Please use one of these packages specific to the platform you are developing for:
43
+
44
+ - [MSAL for Single Page Applications (SPAs)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser)
45
+ - [MSAL for Node.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node)
46
+
47
+ ## Installation
48
+ ### Via NPM:
49
+
50
+ npm install @azure/msal-common
51
+
52
+ ## Security Reporting
53
+
54
+ If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.
55
+
56
+ ## License
57
+
58
+ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License");
59
+
60
+ ## We Value and Adhere to the Microsoft Open Source Code of Conduct
61
+
62
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.0.0 2022-01-04 */
1
+ /*! @azure/msal-common v6.3.0-beta.0 2022-04-27 */
2
2
  'use strict';
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -1,3 +1,4 @@
1
+ import { TokenClaims } from "./TokenClaims";
1
2
  /**
2
3
  * Account object with the following signature:
3
4
  * - homeAccountId - Home account identifier for this account object
@@ -8,6 +9,7 @@
8
9
  * - name - Full name for the account, including given name and family name
9
10
  * - idTokenClaims - Object contains claims from ID token
10
11
  * - localAccountId - The user's account ID
12
+ * - nativeAccountId - The user's native account ID
11
13
  */
12
14
  export declare type AccountInfo = {
13
15
  homeAccountId: string;
@@ -16,6 +18,9 @@ export declare type AccountInfo = {
16
18
  username: string;
17
19
  localAccountId: string;
18
20
  name?: string;
19
- idTokenClaims?: object;
21
+ idTokenClaims?: TokenClaims & {
22
+ [key: string]: string | number | string[] | object | undefined | unknown;
23
+ };
24
+ nativeAccountId?: string;
20
25
  };
21
26
  //# sourceMappingURL=AccountInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,oBAAY,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C;;;;;;;;;;;GAWG;AACH,oBAAY,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,WAAW,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;KAAE,CAAC;IAC3G,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.0.0 2022-01-04 */
1
+ /*! @azure/msal-common v6.3.0-beta.0 2022-04-27 */
2
2
  'use strict';
3
3
  import { ClientAuthError } from '../error/ClientAuthError.js';
4
4
  import { StringUtils } from '../utils/StringUtils.js';
@@ -1 +1 @@
1
- {"version":3,"file":"AuthToken.js","sources":["../../src/account/AuthToken.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TokenClaims } from \"./TokenClaims\";\nimport { DecodedAuthToken } from \"./DecodedAuthToken\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\n\n/**\n * JWT Token representation class. Parses token string and generates claims object.\n */\nexport class AuthToken {\n\n // Raw Token string\n rawToken: string;\n // Claims inside token\n claims: TokenClaims;\n constructor(rawToken: string, crypto: ICrypto) {\n if (StringUtils.isEmpty(rawToken)) {\n throw ClientAuthError.createTokenNullOrEmptyError(rawToken);\n }\n\n this.rawToken = rawToken;\n this.claims = AuthToken.extractTokenClaims(rawToken, crypto);\n }\n\n /**\n * Extract token by decoding the rawToken\n *\n * @param encodedToken\n */\n static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims {\n\n const decodedToken: DecodedAuthToken = StringUtils.decodeAuthToken(encodedToken);\n\n // token will be decoded to get the username\n try {\n const base64TokenPayload = decodedToken.JWSPayload;\n\n // base64Decode() should throw an error if there is an issue\n const base64Decoded = crypto.base64Decode(base64TokenPayload);\n return JSON.parse(base64Decoded) as TokenClaims;\n } catch (err) {\n throw ClientAuthError.createTokenParsingError(err);\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAWA;;;;IASI,mBAAY,QAAgB,EAAE,MAAe;QACzC,IAAI,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC/B,MAAM,eAAe,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KAChE;;;;;;IAOM,4BAAkB,GAAzB,UAA0B,YAAoB,EAAE,MAAe;QAE3D,IAAM,YAAY,GAAqB,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;;QAGjF,IAAI;YACA,IAAM,kBAAkB,GAAG,YAAY,CAAC,UAAU,CAAC;;YAGnD,IAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;YAC9D,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAgB,CAAC;SACnD;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,eAAe,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;SACtD;KACJ;IACL,gBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"AuthToken.js","sources":["../../src/account/AuthToken.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { TokenClaims } from \"./TokenClaims\";\r\nimport { DecodedAuthToken } from \"./DecodedAuthToken\";\r\nimport { ClientAuthError } from \"../error/ClientAuthError\";\r\nimport { StringUtils } from \"../utils/StringUtils\";\r\nimport { ICrypto } from \"../crypto/ICrypto\";\r\n\r\n/**\r\n * JWT Token representation class. Parses token string and generates claims object.\r\n */\r\nexport class AuthToken {\r\n\r\n // Raw Token string\r\n rawToken: string;\r\n // Claims inside token\r\n claims: TokenClaims;\r\n constructor(rawToken: string, crypto: ICrypto) {\r\n if (StringUtils.isEmpty(rawToken)) {\r\n throw ClientAuthError.createTokenNullOrEmptyError(rawToken);\r\n }\r\n\r\n this.rawToken = rawToken;\r\n this.claims = AuthToken.extractTokenClaims(rawToken, crypto);\r\n }\r\n\r\n /**\r\n * Extract token by decoding the rawToken\r\n *\r\n * @param encodedToken\r\n */\r\n static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims {\r\n\r\n const decodedToken: DecodedAuthToken = StringUtils.decodeAuthToken(encodedToken);\r\n\r\n // token will be decoded to get the username\r\n try {\r\n const base64TokenPayload = decodedToken.JWSPayload;\r\n\r\n // base64Decode() should throw an error if there is an issue\r\n const base64Decoded = crypto.base64Decode(base64TokenPayload);\r\n return JSON.parse(base64Decoded) as TokenClaims;\r\n } catch (err) {\r\n throw ClientAuthError.createTokenParsingError(err);\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;;AAWA;;;;IASI,mBAAY,QAAgB,EAAE,MAAe;QACzC,IAAI,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC/B,MAAM,eAAe,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KAChE;;;;;;IAOM,4BAAkB,GAAzB,UAA0B,YAAoB,EAAE,MAAe;QAE3D,IAAM,YAAY,GAAqB,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;;QAGjF,IAAI;YACA,IAAM,kBAAkB,GAAG,YAAY,CAAC,UAAU,CAAC;;YAGnD,IAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;YAC9D,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAgB,CAAC;SACnD;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,eAAe,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;SACtD;KACJ;IACL,gBAAC;AAAD,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.0.0 2022-01-04 */
1
+ /*! @azure/msal-common v6.3.0-beta.0 2022-04-27 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1 +1 @@
1
- {"version":3,"file":"CcsCredential.js","sources":["../../src/account/CcsCredential.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type CcsCredential = {\n credential: string,\n type: CcsCredentialType\n};\n\nexport enum CcsCredentialType {\n HOME_ACCOUNT_ID = \"home_account_id\",\n UPN = \"UPN\"\n}\n"],"names":[],"mappings":";;AAAA;;;;IAUY;AAAZ,WAAY,iBAAiB;IACzB,wDAAmC,CAAA;IACnC,gCAAW,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB;;;;"}
1
+ {"version":3,"file":"CcsCredential.js","sources":["../../src/account/CcsCredential.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nexport type CcsCredential = {\r\n credential: string,\r\n type: CcsCredentialType\r\n};\r\n\r\nexport enum CcsCredentialType {\r\n HOME_ACCOUNT_ID = \"home_account_id\",\r\n UPN = \"UPN\"\r\n}\r\n"],"names":[],"mappings":";;AAAA;;;;IAUY;AAAZ,WAAY,iBAAiB;IACzB,wDAAmC,CAAA;IACnC,gCAAW,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.0.0 2022-01-04 */
1
+ /*! @azure/msal-common v6.3.0-beta.0 2022-04-27 */
2
2
  'use strict';
3
3
  import { ClientAuthError } from '../error/ClientAuthError.js';
4
4
  import { StringUtils } from '../utils/StringUtils.js';
@@ -1 +1 @@
1
- {"version":3,"file":"ClientInfo.js","sources":["../../src/account/ClientInfo.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ICrypto } from \"../crypto/ICrypto\";\nimport { Separators, Constants } from \"../utils/Constants\";\n\n/**\n * Client info object which consists of two IDs. Need to add more info here.\n */\nexport type ClientInfo = {\n uid: string,\n utid: string\n};\n\n/**\n * Function to build a client info object from server clientInfo string\n * @param rawClientInfo\n * @param crypto\n */\nexport function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo {\n if (StringUtils.isEmpty(rawClientInfo)) {\n throw ClientAuthError.createClientInfoEmptyError();\n }\n\n try {\n const decodedClientInfo: string = crypto.base64Decode(rawClientInfo);\n return JSON.parse(decodedClientInfo) as ClientInfo;\n } catch (e) {\n throw ClientAuthError.createClientInfoDecodingError(e);\n }\n}\n\n/**\n * Function to build a client info object from cached homeAccountId string\n * @param homeAccountId \n */\nexport function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo {\n if (StringUtils.isEmpty(homeAccountId)) {\n throw ClientAuthError.createClientInfoDecodingError(\"Home account ID was empty.\");\n }\n const clientInfoParts: string[] = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);\n return {\n uid: clientInfoParts[0],\n utid: clientInfoParts.length < 2 ? Constants.EMPTY_STRING : clientInfoParts[1]\n };\n}\n"],"names":[],"mappings":";;;;;;AAAA;;;;AAkBA;;;;;SAKgB,eAAe,CAAC,aAAqB,EAAE,MAAe;IAClE,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,MAAM,eAAe,CAAC,0BAA0B,EAAE,CAAC;KACtD;IAED,IAAI;QACA,IAAM,iBAAiB,GAAW,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAe,CAAC;KACtD;IAAC,OAAO,CAAC,EAAE;QACR,MAAM,eAAe,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;KAC1D;AACL,CAAC;AAED;;;;SAIgB,gCAAgC,CAAC,aAAqB;IAClE,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,MAAM,eAAe,CAAC,6BAA6B,CAAC,4BAA4B,CAAC,CAAC;KACrF;IACD,IAAM,eAAe,GAAa,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAC3F,OAAO;QACH,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC;KACjF,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"ClientInfo.js","sources":["../../src/account/ClientInfo.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { ClientAuthError } from \"../error/ClientAuthError\";\r\nimport { StringUtils } from \"../utils/StringUtils\";\r\nimport { ICrypto } from \"../crypto/ICrypto\";\r\nimport { Separators, Constants } from \"../utils/Constants\";\r\n\r\n/**\r\n * Client info object which consists of two IDs. Need to add more info here.\r\n */\r\nexport type ClientInfo = {\r\n uid: string,\r\n utid: string\r\n};\r\n\r\n/**\r\n * Function to build a client info object from server clientInfo string\r\n * @param rawClientInfo\r\n * @param crypto\r\n */\r\nexport function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo {\r\n if (StringUtils.isEmpty(rawClientInfo)) {\r\n throw ClientAuthError.createClientInfoEmptyError();\r\n }\r\n\r\n try {\r\n const decodedClientInfo: string = crypto.base64Decode(rawClientInfo);\r\n return JSON.parse(decodedClientInfo) as ClientInfo;\r\n } catch (e) {\r\n throw ClientAuthError.createClientInfoDecodingError(e);\r\n }\r\n}\r\n\r\n/**\r\n * Function to build a client info object from cached homeAccountId string\r\n * @param homeAccountId \r\n */\r\nexport function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo {\r\n if (StringUtils.isEmpty(homeAccountId)) {\r\n throw ClientAuthError.createClientInfoDecodingError(\"Home account ID was empty.\");\r\n }\r\n const clientInfoParts: string[] = homeAccountId.split(Separators.CLIENT_INFO_SEPARATOR, 2);\r\n return {\r\n uid: clientInfoParts[0],\r\n utid: clientInfoParts.length < 2 ? Constants.EMPTY_STRING : clientInfoParts[1]\r\n };\r\n}\r\n"],"names":[],"mappings":";;;;;;AAAA;;;;AAkBA;;;;;SAKgB,eAAe,CAAC,aAAqB,EAAE,MAAe;IAClE,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,MAAM,eAAe,CAAC,0BAA0B,EAAE,CAAC;KACtD;IAED,IAAI;QACA,IAAM,iBAAiB,GAAW,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAe,CAAC;KACtD;IAAC,OAAO,CAAC,EAAE;QACR,MAAM,eAAe,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;KAC1D;AACL,CAAC;AAED;;;;SAIgB,gCAAgC,CAAC,aAAqB;IAClE,IAAI,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,MAAM,eAAe,CAAC,6BAA6B,CAAC,4BAA4B,CAAC,CAAC;KACrF;IACD,IAAM,eAAe,GAAa,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAC3F,OAAO;QACH,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC;KACjF,CAAC;AACN;;;;"}
@@ -2,17 +2,44 @@
2
2
  * Type which describes Id Token claims known by MSAL.
3
3
  */
4
4
  export declare type TokenClaims = {
5
+ /**
6
+ * Audience
7
+ */
8
+ aud?: string;
9
+ /**
10
+ * Issuer
11
+ */
5
12
  iss?: string;
13
+ /**
14
+ * Issued at
15
+ */
6
16
  iat?: number;
17
+ /**
18
+ * Not valid before
19
+ */
20
+ nbf?: number;
21
+ /**
22
+ * Immutable object identifier, this ID uniquely identifies the user across applications
23
+ */
7
24
  oid?: string;
25
+ /**
26
+ * Immutable subject identifier, this is a pairwise identifier - it is unique to a particular application ID
27
+ */
8
28
  sub?: string;
29
+ /**
30
+ * Users' tenant or '9188040d-6c67-4c5b-b112-36a304b66dad' for personal accounts.
31
+ */
9
32
  tid?: string;
10
33
  ver?: string;
11
34
  upn?: string;
12
35
  preferred_username?: string;
36
+ login_hint?: string;
13
37
  emails?: string[];
14
38
  name?: string;
15
39
  nonce?: string;
40
+ /**
41
+ * Expiration
42
+ */
16
43
  exp?: number;
17
44
  home_oid?: string;
18
45
  sid?: string;
@@ -26,5 +53,8 @@ export declare type TokenClaims = {
26
53
  u?: string;
27
54
  p?: string;
28
55
  m?: string;
56
+ roles?: string[];
57
+ amr?: string[];
58
+ idp?: string;
29
59
  };
30
60
  //# sourceMappingURL=TokenClaims.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,WAAW,GAAG;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,GAAG,CAAC,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAA;CACb,CAAC"}
1
+ {"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,WAAW,GAAG;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,GAAG,CAAC,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -7,6 +7,7 @@ import { ICacheManager } from "../cache/interface/ICacheManager";
7
7
  import { AuthorityOptions } from "./AuthorityOptions";
8
8
  import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata";
9
9
  import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata";
10
+ import { AzureCloudOptions } from "../config/ClientConfiguration";
10
11
  /**
11
12
  * The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the
12
13
  * endpoint. It will store the pertinent config data in this object for use during token calls.
@@ -20,7 +21,8 @@ export declare class Authority {
20
21
  private metadata;
21
22
  private regionDiscovery;
22
23
  regionDiscoveryMetadata: RegionDiscoveryMetadata;
23
- constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions);
24
+ private proxyUrl;
25
+ constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, proxyUrl?: string);
24
26
  get authorityType(): AuthorityType;
25
27
  /**
26
28
  * ProtocolMode enum representing the way endpoints are constructed.
@@ -128,6 +130,12 @@ export declare class Authority {
128
130
  * Helper function to determine if this host is included in the knownAuthorities config option
129
131
  */
130
132
  private isInKnownAuthorities;
133
+ /**
134
+ * helper function to populate the authority based on azureCloudOptions
135
+ * @param authorityString
136
+ * @param azureCloudOptions
137
+ */
138
+ static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string;
131
139
  /**
132
140
  * Creates cloud discovery metadata object from a given host
133
141
  * @param host
@@ -1 +1 @@
1
- {"version":3,"file":"Authority.d.ts","sourceRoot":"","sources":["../../src/authority/Authority.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAA0B,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;GAGG;AACH,qBAAa,SAAS;IAGlB,OAAO,CAAC,mBAAmB,CA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AAM,CAAC,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM;IAyB/F;;;;;OAKG;IACH,MAAM,CAAC,8BAA8B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,GAAG,oBAAoB;CAWnH"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.0.0 2022-01-04 */
1
+ /*! @azure/msal-common v6.3.0-beta.0 2022-04-27 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { AuthorityType } from './AuthorityType.js';
@@ -9,6 +9,7 @@ import { Constants, AuthorityMetadataSource, RegionDiscoveryOutcomes } from '../
9
9
  import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
10
10
  import { ProtocolMode } from './ProtocolMode.js';
11
11
  import { AuthorityMetadataEntity } from '../cache/entities/AuthorityMetadataEntity.js';
12
+ import { AzureCloudInstance } from './AuthorityOptions.js';
12
13
  import { isCloudInstanceDiscoveryResponse } from './CloudInstanceDiscoveryResponse.js';
13
14
  import { RegionDiscovery } from './RegionDiscovery.js';
14
15
 
@@ -21,7 +22,7 @@ import { RegionDiscovery } from './RegionDiscovery.js';
21
22
  * endpoint. It will store the pertinent config data in this object for use during token calls.
22
23
  */
23
24
  var Authority = /** @class */ (function () {
24
- function Authority(authority, networkInterface, cacheManager, authorityOptions) {
25
+ function Authority(authority, networkInterface, cacheManager, authorityOptions, proxyUrl) {
25
26
  this.canonicalAuthority = authority;
26
27
  this._canonicalAuthority.validateAsUri();
27
28
  this.networkInterface = networkInterface;
@@ -29,6 +30,7 @@ var Authority = /** @class */ (function () {
29
30
  this.authorityOptions = authorityOptions;
30
31
  this.regionDiscovery = new RegionDiscovery(networkInterface);
31
32
  this.regionDiscoveryMetadata = { region_used: undefined, region_source: undefined, region_outcome: undefined };
33
+ this.proxyUrl = proxyUrl || Constants.EMPTY_STRING;
32
34
  }
33
35
  Object.defineProperty(Authority.prototype, "authorityType", {
34
36
  // See above for AuthorityType
@@ -297,7 +299,7 @@ var Authority = /** @class */ (function () {
297
299
  metadata = _b.sent();
298
300
  if (!metadata) return [3 /*break*/, 4];
299
301
  if (!((_a = this.authorityOptions.azureRegionConfiguration) === null || _a === void 0 ? void 0 : _a.azureRegion)) return [3 /*break*/, 3];
300
- return [4 /*yield*/, this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion, this.regionDiscoveryMetadata)];
302
+ return [4 /*yield*/, this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion, this.regionDiscoveryMetadata, this.proxyUrl)];
301
303
  case 2:
302
304
  autodetectedRegionName = _b.sent();
303
305
  azureRegion = this.authorityOptions.azureRegionConfiguration.azureRegion === Constants.AZURE_REGION_AUTO_DISCOVER_FLAG
@@ -360,19 +362,25 @@ var Authority = /** @class */ (function () {
360
362
  */
361
363
  Authority.prototype.getEndpointMetadataFromNetwork = function () {
362
364
  return __awaiter(this, void 0, void 0, function () {
363
- var response;
365
+ var options, response;
364
366
  return __generator(this, function (_a) {
365
367
  switch (_a.label) {
366
368
  case 0:
367
- _a.trys.push([0, 2, , 3]);
368
- return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint)];
369
+ options = {};
370
+ if (this.proxyUrl) {
371
+ options.proxyUrl = this.proxyUrl;
372
+ }
373
+ _a.label = 1;
369
374
  case 1:
375
+ _a.trys.push([1, 3, , 4]);
376
+ return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint, options)];
377
+ case 2:
370
378
  response = _a.sent();
371
379
  return [2 /*return*/, isOpenIdConfigResponse(response.body) ? response.body : null];
372
- case 2:
380
+ case 3:
373
381
  _a.sent();
374
382
  return [2 /*return*/, null];
375
- case 3: return [2 /*return*/];
383
+ case 4: return [2 /*return*/];
376
384
  }
377
385
  });
378
386
  });
@@ -442,16 +450,20 @@ var Authority = /** @class */ (function () {
442
450
  */
443
451
  Authority.prototype.getCloudDiscoveryMetadataFromNetwork = function () {
444
452
  return __awaiter(this, void 0, void 0, function () {
445
- var instanceDiscoveryEndpoint, match, response, metadata;
453
+ var instanceDiscoveryEndpoint, options, match, response, metadata;
446
454
  return __generator(this, function (_a) {
447
455
  switch (_a.label) {
448
456
  case 0:
449
457
  instanceDiscoveryEndpoint = "" + Constants.AAD_INSTANCE_DISCOVERY_ENDPT + this.canonicalAuthority + "oauth2/v2.0/authorize";
458
+ options = {};
459
+ if (this.proxyUrl) {
460
+ options.proxyUrl = this.proxyUrl;
461
+ }
450
462
  match = null;
451
463
  _a.label = 1;
452
464
  case 1:
453
465
  _a.trys.push([1, 3, , 4]);
454
- return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint)];
466
+ return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options)];
455
467
  case 2:
456
468
  response = _a.sent();
457
469
  metadata = isCloudInstanceDiscoveryResponse(response.body) ? response.body.metadata : [];
@@ -466,7 +478,7 @@ var Authority = /** @class */ (function () {
466
478
  return [2 /*return*/, null];
467
479
  case 4:
468
480
  if (!match) {
469
- // Custom Domain scenario, host is trusted because Instance Discovery call succeeded
481
+ // Custom Domain scenario, host is trusted because Instance Discovery call succeeded
470
482
  match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
471
483
  }
472
484
  return [2 /*return*/, match];
@@ -484,6 +496,19 @@ var Authority = /** @class */ (function () {
484
496
  });
485
497
  return matches.length > 0;
486
498
  };
499
+ /**
500
+ * helper function to populate the authority based on azureCloudOptions
501
+ * @param authorityString
502
+ * @param azureCloudOptions
503
+ */
504
+ Authority.generateAuthority = function (authorityString, azureCloudOptions) {
505
+ var authorityAzureCloudInstance;
506
+ if (azureCloudOptions && azureCloudOptions.azureCloudInstance !== AzureCloudInstance.None) {
507
+ var tenant = azureCloudOptions.tenant ? azureCloudOptions.tenant : Constants.DEFAULT_COMMON_TENANT;
508
+ authorityAzureCloudInstance = azureCloudOptions.azureCloudInstance + "/" + tenant + "/";
509
+ }
510
+ return authorityAzureCloudInstance ? authorityAzureCloudInstance : authorityString;
511
+ };
487
512
  /**
488
513
  * Creates cloud discovery metadata object from a given host
489
514
  * @param host