@azure/msal-common 5.0.1 → 6.1.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 (186) hide show
  1. package/CHANGELOG.json +1319 -1187
  2. package/CHANGELOG.md +504 -452
  3. package/LICENSE +21 -21
  4. package/README.md +62 -62
  5. package/dist/_virtual/_tslib.js +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 +1 -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 +43 -12
  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 +7 -0
  23. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  24. package/dist/authority/AuthorityOptions.js +22 -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.d.ts +1 -1
  33. package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -1
  34. package/dist/authority/OpenIdConfigResponse.js +1 -2
  35. package/dist/authority/OpenIdConfigResponse.js.map +1 -1
  36. package/dist/authority/ProtocolMode.js +1 -1
  37. package/dist/authority/ProtocolMode.js.map +1 -1
  38. package/dist/authority/RegionDiscovery.d.ts +3 -6
  39. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  40. package/dist/authority/RegionDiscovery.js +19 -11
  41. package/dist/authority/RegionDiscovery.js.map +1 -1
  42. package/dist/cache/CacheManager.d.ts +15 -5
  43. package/dist/cache/CacheManager.d.ts.map +1 -1
  44. package/dist/cache/CacheManager.js +49 -18
  45. package/dist/cache/CacheManager.js.map +1 -1
  46. package/dist/cache/entities/AccessTokenEntity.d.ts +3 -1
  47. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  48. package/dist/cache/entities/AccessTokenEntity.js +23 -10
  49. package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
  50. package/dist/cache/entities/AccountEntity.js +1 -1
  51. package/dist/cache/entities/AccountEntity.js.map +1 -1
  52. package/dist/cache/entities/AppMetadataEntity.js +1 -1
  53. package/dist/cache/entities/AppMetadataEntity.js.map +1 -1
  54. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +1 -1
  55. package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -1
  56. package/dist/cache/entities/AuthorityMetadataEntity.js +1 -2
  57. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
  58. package/dist/cache/entities/CacheRecord.js +1 -1
  59. package/dist/cache/entities/CacheRecord.js.map +1 -1
  60. package/dist/cache/entities/CredentialEntity.d.ts +13 -2
  61. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  62. package/dist/cache/entities/CredentialEntity.js +25 -10
  63. package/dist/cache/entities/CredentialEntity.js.map +1 -1
  64. package/dist/cache/entities/IdTokenEntity.js +1 -1
  65. package/dist/cache/entities/IdTokenEntity.js.map +1 -1
  66. package/dist/cache/entities/RefreshTokenEntity.js +1 -1
  67. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -1
  68. package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
  69. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -1
  70. package/dist/cache/entities/ThrottlingEntity.js +1 -1
  71. package/dist/cache/entities/ThrottlingEntity.js.map +1 -1
  72. package/dist/cache/persistence/TokenCacheContext.js +1 -1
  73. package/dist/cache/persistence/TokenCacheContext.js.map +1 -1
  74. package/dist/cache/utils/CacheTypes.d.ts +2 -0
  75. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  76. package/dist/client/AuthorizationCodeClient.d.ts +1 -0
  77. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  78. package/dist/client/AuthorizationCodeClient.js +49 -10
  79. package/dist/client/AuthorizationCodeClient.js.map +1 -1
  80. package/dist/client/BaseClient.js +2 -2
  81. package/dist/client/BaseClient.js.map +1 -1
  82. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  83. package/dist/client/ClientCredentialClient.js +4 -2
  84. package/dist/client/ClientCredentialClient.js.map +1 -1
  85. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  86. package/dist/client/DeviceCodeClient.js +9 -4
  87. package/dist/client/DeviceCodeClient.js.map +1 -1
  88. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  89. package/dist/client/OnBehalfOfClient.js +4 -2
  90. package/dist/client/OnBehalfOfClient.js.map +1 -1
  91. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  92. package/dist/client/RefreshTokenClient.js +20 -8
  93. package/dist/client/RefreshTokenClient.js.map +1 -1
  94. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  95. package/dist/client/SilentFlowClient.js +14 -18
  96. package/dist/client/SilentFlowClient.js.map +1 -1
  97. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  98. package/dist/client/UsernamePasswordClient.js +4 -2
  99. package/dist/client/UsernamePasswordClient.js.map +1 -1
  100. package/dist/config/ClientConfiguration.d.ts +13 -0
  101. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  102. package/dist/config/ClientConfiguration.js +9 -3
  103. package/dist/config/ClientConfiguration.js.map +1 -1
  104. package/dist/crypto/ICrypto.d.ts +6 -1
  105. package/dist/crypto/ICrypto.d.ts.map +1 -1
  106. package/dist/crypto/ICrypto.js +10 -1
  107. package/dist/crypto/ICrypto.js.map +1 -1
  108. package/dist/crypto/PopTokenGenerator.js +4 -4
  109. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  110. package/dist/error/AuthError.js +1 -1
  111. package/dist/error/AuthError.js.map +1 -1
  112. package/dist/error/ClientAuthError.d.ts +8 -0
  113. package/dist/error/ClientAuthError.d.ts.map +1 -1
  114. package/dist/error/ClientAuthError.js +11 -1
  115. package/dist/error/ClientAuthError.js.map +1 -1
  116. package/dist/error/ClientConfigurationError.d.ts +40 -0
  117. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  118. package/dist/error/ClientConfigurationError.js +53 -3
  119. package/dist/error/ClientConfigurationError.js.map +1 -1
  120. package/dist/error/InteractionRequiredAuthError.js +1 -1
  121. package/dist/error/InteractionRequiredAuthError.js.map +1 -1
  122. package/dist/error/ServerError.js +1 -1
  123. package/dist/error/ServerError.js.map +1 -1
  124. package/dist/index.cjs.js +445 -115
  125. package/dist/index.cjs.js.map +1 -1
  126. package/dist/index.d.ts +3 -2
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +3 -1
  129. package/dist/index.js.map +1 -1
  130. package/dist/logger/Logger.js +1 -1
  131. package/dist/logger/Logger.js.map +1 -1
  132. package/dist/network/INetworkModule.d.ts +1 -0
  133. package/dist/network/INetworkModule.d.ts.map +1 -1
  134. package/dist/network/INetworkModule.js +1 -1
  135. package/dist/network/INetworkModule.js.map +1 -1
  136. package/dist/network/NetworkManager.js +1 -1
  137. package/dist/network/NetworkManager.js.map +1 -1
  138. package/dist/network/RequestThumbprint.d.ts +2 -0
  139. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  140. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  141. package/dist/network/ThrottlingUtils.js +4 -2
  142. package/dist/network/ThrottlingUtils.js.map +1 -1
  143. package/dist/packageMetadata.d.ts +1 -1
  144. package/dist/packageMetadata.js +2 -2
  145. package/dist/packageMetadata.js.map +1 -1
  146. package/dist/request/AuthenticationHeaderParser.d.ts +20 -0
  147. package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
  148. package/dist/request/AuthenticationHeaderParser.js +64 -0
  149. package/dist/request/AuthenticationHeaderParser.js.map +1 -0
  150. package/dist/request/BaseAuthRequest.d.ts +14 -3
  151. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  152. package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -0
  153. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  154. package/dist/request/CommonEndSessionRequest.d.ts +2 -0
  155. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  156. package/dist/request/RequestParameterBuilder.d.ts +8 -0
  157. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  158. package/dist/request/RequestParameterBuilder.js +16 -1
  159. package/dist/request/RequestParameterBuilder.js.map +1 -1
  160. package/dist/request/RequestValidator.js +1 -1
  161. package/dist/request/RequestValidator.js.map +1 -1
  162. package/dist/request/ScopeSet.js +1 -1
  163. package/dist/request/ScopeSet.js.map +1 -1
  164. package/dist/response/AuthenticationResult.d.ts +2 -1
  165. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  166. package/dist/response/ResponseHandler.d.ts +1 -1
  167. package/dist/response/ResponseHandler.d.ts.map +1 -1
  168. package/dist/response/ResponseHandler.js +11 -8
  169. package/dist/response/ResponseHandler.js.map +1 -1
  170. package/dist/response/ServerAuthorizationTokenResponse.d.ts +3 -0
  171. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
  172. package/dist/telemetry/server/ServerTelemetryManager.js +1 -1
  173. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
  174. package/dist/url/UrlString.js +1 -1
  175. package/dist/url/UrlString.js.map +1 -1
  176. package/dist/utils/Constants.d.ts +9 -3
  177. package/dist/utils/Constants.d.ts.map +1 -1
  178. package/dist/utils/Constants.js +8 -2
  179. package/dist/utils/Constants.js.map +1 -1
  180. package/dist/utils/ProtocolUtils.js +1 -1
  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 +76 -76
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { ClientCredentialClient } from "./client/ClientCredentialClient";
9
9
  export { OnBehalfOfClient } from "./client/OnBehalfOfClient";
10
10
  export { SilentFlowClient } from "./client/SilentFlowClient";
11
11
  export { UsernamePasswordClient } from "./client/UsernamePasswordClient";
12
- export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS } from "./config/ClientConfiguration";
12
+ export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions } from "./config/ClientConfiguration";
13
13
  export { ClientConfiguration } from "./config/ClientConfiguration";
14
14
  export { AccountInfo } from "./account/AccountInfo";
15
15
  export { AuthToken } from "./account/AuthToken";
@@ -18,7 +18,7 @@ export { TokenClaims } from "./account/TokenClaims";
18
18
  export { TokenClaims as IdTokenClaims } from "./account/TokenClaims";
19
19
  export { CcsCredential, CcsCredentialType } from "./account/CcsCredential";
20
20
  export { Authority } from "./authority/Authority";
21
- export { AuthorityOptions } from "./authority/AuthorityOptions";
21
+ export { AuthorityOptions, AzureCloudInstance } from "./authority/AuthorityOptions";
22
22
  export { AuthorityFactory } from "./authority/AuthorityFactory";
23
23
  export { AuthorityType } from "./authority/AuthorityType";
24
24
  export { ProtocolMode } from "./authority/ProtocolMode";
@@ -63,6 +63,7 @@ export { ServerAuthorizationTokenResponse } from "./response/ServerAuthorization
63
63
  export { ExternalTokenResponse } from "./response/ExternalTokenResponse";
64
64
  export { DeviceCodeResponse } from "./response/DeviceCodeResponse";
65
65
  export { ScopeSet } from "./request/ScopeSet";
66
+ export { AuthenticationHeaderParser } from "./request/AuthenticationHeaderParser";
66
67
  export { ILoggerCallback, LogLevel, Logger } from "./logger/Logger";
67
68
  export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from "./error/InteractionRequiredAuthError";
68
69
  export { AuthError, AuthErrorMessage } from "./error/AuthError";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yB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AO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAE7G,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvM,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.js';
4
4
  export { DeviceCodeClient } from './client/DeviceCodeClient.js';
@@ -11,6 +11,7 @@ export { DEFAULT_SYSTEM_OPTIONS } from './config/ClientConfiguration.js';
11
11
  export { AuthToken, AuthToken as IdToken } from './account/AuthToken.js';
12
12
  export { CcsCredentialType } from './account/CcsCredential.js';
13
13
  export { Authority } from './authority/Authority.js';
14
+ export { AzureCloudInstance } from './authority/AuthorityOptions.js';
14
15
  export { AuthorityFactory } from './authority/AuthorityFactory.js';
15
16
  export { AuthorityType } from './authority/AuthorityType.js';
16
17
  export { ProtocolMode } from './authority/ProtocolMode.js';
@@ -31,6 +32,7 @@ export { ThrottlingUtils } from './network/ThrottlingUtils.js';
31
32
  export { UrlString } from './url/UrlString.js';
32
33
  export { DEFAULT_CRYPTO_IMPLEMENTATION } from './crypto/ICrypto.js';
33
34
  export { ScopeSet } from './request/ScopeSet.js';
35
+ export { AuthenticationHeaderParser } from './request/AuthenticationHeaderParser.js';
34
36
  export { LogLevel, Logger } from './logger/Logger.js';
35
37
  export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from './error/InteractionRequiredAuthError.js';
36
38
  export { AuthError, AuthErrorMessage } from './error/AuthError.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  import { StringUtils } from '../utils/StringUtils.js';
4
4
  import { Constants } from '../utils/Constants.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.js","sources":["../../src/logger/Logger.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { StringUtils } from \"../utils/StringUtils\";\r\nimport { LoggerOptions } from \"../config/ClientConfiguration\";\r\nimport { Constants } from \"../utils/Constants\";\r\n\r\n/**\r\n * Options for logger messages.\r\n */\r\nexport type LoggerMessageOptions = {\r\n logLevel: LogLevel,\r\n containsPii?: boolean,\r\n context?: string,\r\n correlationId?: string\r\n};\r\n\r\n/**\r\n * Log message level.\r\n */\r\nexport enum LogLevel {\r\n Error,\r\n Warning,\r\n Info,\r\n Verbose,\r\n Trace\r\n}\r\n\r\n/**\r\n * Callback to send the messages to.\r\n */\r\nexport interface ILoggerCallback {\r\n (level: LogLevel, message: string, containsPii: boolean): void;\r\n}\r\n\r\n/**\r\n * Class which facilitates logging of messages to a specific place.\r\n */\r\nexport class Logger {\r\n\r\n // Correlation ID for request, usually set by user.\r\n private correlationId: string;\r\n\r\n // Current log level, defaults to info.\r\n private level: LogLevel = LogLevel.Info;\r\n\r\n // Boolean describing whether PII logging is allowed.\r\n private piiLoggingEnabled: boolean;\r\n\r\n // Callback to send messages to.\r\n private localCallback: ILoggerCallback;\r\n\r\n // Package name implementing this logger\r\n private packageName: string;\r\n\r\n // Package version implementing this logger\r\n private packageVersion: string;\r\n\r\n constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string) {\r\n const defaultLoggerCallback = () => {\r\n return;\r\n };\r\n this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;\r\n this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;\r\n this.level = typeof(loggerOptions.logLevel) === \"number\" ? loggerOptions.logLevel : LogLevel.Info;\r\n this.correlationId = loggerOptions.correlationId || \"\";\r\n\r\n this.packageName = packageName || Constants.EMPTY_STRING;\r\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\r\n }\r\n\r\n /**\r\n * Create new Logger with existing configurations.\r\n */\r\n public clone(packageName: string, packageVersion: string, correlationId?: string): Logger {\r\n return new Logger({loggerCallback: this.localCallback, piiLoggingEnabled: this.piiLoggingEnabled, logLevel: this.level, correlationId: correlationId || this.correlationId}, packageName, packageVersion);\r\n }\r\n\r\n /**\r\n * Log message with required options.\r\n */\r\n private logMessage(logMessage: string, options: LoggerMessageOptions): void {\r\n if ((options.logLevel > this.level) || (!this.piiLoggingEnabled && options.containsPii)) {\r\n return;\r\n }\r\n const timestamp = new Date().toUTCString();\r\n\r\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\r\n let logHeader: string;\r\n if (!StringUtils.isEmpty(options.correlationId)) {\r\n logHeader = `[${timestamp}] : [${options.correlationId}]`;\r\n } else if (!StringUtils.isEmpty(this.correlationId)) {\r\n logHeader = `[${timestamp}] : [${this.correlationId}]`;\r\n } else {\r\n logHeader = `[${timestamp}]`;\r\n }\r\n\r\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\r\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": \"\"}${options.context ? `:${options.context}` : \"\"}`)(logMessage);\r\n this.executeCallback(options.logLevel, log, options.containsPii || false);\r\n }\r\n\r\n /**\r\n * Execute callback with message.\r\n */\r\n executeCallback(level: LogLevel, message: string, containsPii: boolean): void {\r\n if (this.localCallback) {\r\n this.localCallback(level, message, containsPii);\r\n }\r\n }\r\n\r\n /**\r\n * Logs error messages.\r\n */\r\n error(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs error messages with PII.\r\n */\r\n errorPii(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs warning messages.\r\n */\r\n warning(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs warning messages with PII.\r\n */\r\n warningPii(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs info messages.\r\n */\r\n info(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs info messages with PII.\r\n */\r\n infoPii(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs verbose messages.\r\n */\r\n verbose(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs verbose messages with PII.\r\n */\r\n verbosePii(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs trace messages.\r\n */\r\n trace(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: false,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Logs trace messages with PII.\r\n */\r\n tracePii(message: string, correlationId?: string): void {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: true,\r\n correlationId: correlationId || \"\"\r\n });\r\n }\r\n\r\n /**\r\n * Returns whether PII Logging is enabled or not.\r\n */\r\n isPiiLoggingEnabled(): boolean {\r\n return this.piiLoggingEnabled || false;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;;AAmBA;;;IAGY;AAAZ,WAAY,QAAQ;IAChB,yCAAK,CAAA;IACL,6CAAO,CAAA;IACP,uCAAI,CAAA;IACJ,6CAAO,CAAA;IACP,yCAAK,CAAA;AACT,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AASD;;;;IAuBI,gBAAY,aA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KACN;;;;IAKD,sBAAK,GAAL,UAAM,OAAe,EAAE,aAAsB;QACzC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,yBAAQ,GAAR,UAAS,OAAe,EAAE,aAAsB;QAC5C,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,oCAAmB,GAAnB;QACI,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;KAC1C;IACL,aAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"Logger.js","sources":["../../src/logger/Logger.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { LoggerOptions } from \"../config/ClientConfiguration\";\nimport { Constants } from \"../utils/Constants\";\n\n/**\n * Options for logger messages.\n */\nexport type LoggerMessageOptions = {\n logLevel: LogLevel,\n containsPii?: boolean,\n context?: string,\n correlationId?: string\n};\n\n/**\n * Log message level.\n */\nexport enum LogLevel {\n Error,\n Warning,\n Info,\n Verbose,\n Trace\n}\n\n/**\n * Callback to send the messages to.\n */\nexport interface ILoggerCallback {\n (level: LogLevel, message: string, containsPii: boolean): void;\n}\n\n/**\n * Class which facilitates logging of messages to a specific place.\n */\nexport class Logger {\n\n // Correlation ID for request, usually set by user.\n private correlationId: string;\n\n // Current log level, defaults to info.\n private level: LogLevel = LogLevel.Info;\n\n // Boolean describing whether PII logging is allowed.\n private piiLoggingEnabled: boolean;\n\n // Callback to send messages to.\n private localCallback: ILoggerCallback;\n\n // Package name implementing this logger\n private packageName: string;\n\n // Package version implementing this logger\n private packageVersion: string;\n\n constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string) {\n const defaultLoggerCallback = () => {\n return;\n };\n this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;\n this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;\n this.level = typeof(loggerOptions.logLevel) === \"number\" ? loggerOptions.logLevel : LogLevel.Info;\n this.correlationId = loggerOptions.correlationId || \"\";\n\n this.packageName = packageName || Constants.EMPTY_STRING;\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\n }\n\n /**\n * Create new Logger with existing configurations.\n */\n public clone(packageName: string, packageVersion: string, correlationId?: string): Logger {\n return new Logger({loggerCallback: this.localCallback, piiLoggingEnabled: this.piiLoggingEnabled, logLevel: this.level, correlationId: correlationId || this.correlationId}, packageName, packageVersion);\n }\n\n /**\n * Log message with required options.\n */\n private logMessage(logMessage: string, options: LoggerMessageOptions): void {\n if ((options.logLevel > this.level) || (!this.piiLoggingEnabled && options.containsPii)) {\n return;\n }\n const timestamp = new Date().toUTCString();\n\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\n let logHeader: string;\n if (!StringUtils.isEmpty(options.correlationId)) {\n logHeader = `[${timestamp}] : [${options.correlationId}]`;\n } else if (!StringUtils.isEmpty(this.correlationId)) {\n logHeader = `[${timestamp}] : [${this.correlationId}]`;\n } else {\n logHeader = `[${timestamp}]`;\n }\n\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": \"\"}${options.context ? `:${options.context}` : \"\"}`)(logMessage);\n this.executeCallback(options.logLevel, log, options.containsPii || false);\n }\n\n /**\n * Execute callback with message.\n */\n executeCallback(level: LogLevel, message: string, containsPii: boolean): void {\n if (this.localCallback) {\n this.localCallback(level, message, containsPii);\n }\n }\n\n /**\n * Logs error messages.\n */\n error(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Error,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs error messages with PII.\n */\n errorPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Error,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs warning messages.\n */\n warning(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Warning,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs warning messages with PII.\n */\n warningPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Warning,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs info messages.\n */\n info(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Info,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs info messages with PII.\n */\n infoPii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Info,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs verbose messages.\n */\n verbose(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Verbose,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs verbose messages with PII.\n */\n verbosePii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Verbose,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs trace messages.\n */\n trace(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Trace,\n containsPii: false,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Logs trace messages with PII.\n */\n tracePii(message: string, correlationId?: string): void {\n this.logMessage(message, {\n logLevel: LogLevel.Trace,\n containsPii: true,\n correlationId: correlationId || \"\"\n });\n }\n\n /**\n * Returns whether PII Logging is enabled or not.\n */\n isPiiLoggingEnabled(): boolean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Aa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,2BAAU,GAAV,UAAW,OAAe,EAAE,aAAsB;QAC9C,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,OAAO;YAC1B,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,sBAAK,GAAL,UAAM,OAAe,EAAE,aAAsB;QACzC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,yBAAQ,GAAR,UAAS,OAAe,EAAE,aAAsB;QAC5C,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;YACrB,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,aAAa,IAAI,EAAE;SACrC,CAAC,CAAC;KACN;;;;IAKD,oCAAmB,GAAnB;QACI,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;KAC1C;IACL,aAAC;AAAD,CAAC;;;;"}
@@ -5,6 +5,7 @@ import { NetworkResponse } from "./NetworkManager";
5
5
  export declare type NetworkRequestOptions = {
6
6
  headers?: Record<string, string>;
7
7
  body?: string;
8
+ proxyUrl?: string;
8
9
  };
9
10
  /**
10
11
  * Client network interface to send backend requests.
@@ -1 +1 @@
1
- {"version":3,"file":"INetworkModule.d.ts","sourceRoot":"","sources":["../../src/network/INetworkModule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,oBAAY,qBAAqB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,C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@@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  import { AuthError } from '../error/AuthError.js';
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"INetworkModule.js","sources":["../../src/network/INetworkModule.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"../error/AuthError\";\r\nimport { NetworkResponse } from \"./NetworkManager\";\r\n\r\n/**\r\n * Options allowed by network request APIs.\r\n */\r\nexport type NetworkRequestOptions = {\r\n headers?: Record<string, string>,\r\n body?: string;\r\n};\r\n\r\n/**\r\n * Client network interface to send backend requests.\r\n * @interface\r\n */\r\nexport interface INetworkModule {\r\n\r\n /**\r\n * Interface function for async network \"GET\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\r\n * @param url\r\n * @param requestParams\r\n * @param enableCaching\r\n */\r\n sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions, cancellationToken?: number): Promise<NetworkResponse<T>>;\r\n\r\n /**\r\n * Interface function for async network \"POST\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\r\n * @param url\r\n * @param requestParams\r\n * @param enableCaching\r\n */\r\n sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;\r\n}\r\n\r\nexport const StubbedNetworkModule: INetworkModule = {\r\n sendGetRequestAsync: () => {\r\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented for the Network interface.\";\r\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\r\n },\r\n sendPostRequestAsync: () => {\r\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented for the Network interface.\";\r\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\r\n }\r\n};\r\n"],"names":[],"mappings":";;;;AAAA;;;;IAuCa,oBAAoB,GAAmB;IAChD,mBAAmB,EAAE;QACjB,IAAM,UAAU,GAAG,+FAA+F,CAAC;QACnH,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;KACtE;IACD,oBAAoB,EAAE;QAClB,IAAM,UAAU,GAAG,gGAAgG,CAAC;QACpH,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;KACtE;;;;;"}
1
+ {"version":3,"file":"INetworkModule.js","sources":["../../src/network/INetworkModule.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"../error/AuthError\";\nimport { NetworkResponse } from \"./NetworkManager\";\n\n/**\n * Options allowed by network request APIs.\n */\nexport type NetworkRequestOptions = {\n headers?: Record<string, string>,\n body?: string;\n proxyUrl?: string;\n};\n\n/**\n * Client network interface to send backend requests.\n * @interface\n */\nexport interface INetworkModule {\n\n /**\n * Interface function for async network \"GET\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\n * @param url\n * @param requestParams\n * @param enableCaching\n */\n sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions, cancellationToken?: number): Promise<NetworkResponse<T>>;\n\n /**\n * Interface function for async network \"POST\" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/\n * @param url\n * @param requestParams\n * @param enableCaching\n */\n sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>;\n}\n\nexport const StubbedNetworkModule: INetworkModule = {\n sendGetRequestAsync: () => {\n const notImplErr = \"Network interface - sendGetRequestAsync() has not been implemented for the Network interface.\";\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\n },\n sendPostRequestAsync: () => {\n const notImplErr = \"Network interface - sendPostRequestAsync() has not been implemented for the Network interface.\";\n return Promise.reject(AuthError.createUnexpectedError(notImplErr));\n }\n};\n"],"names":[],"mappings":";;;;AAAA;;;;IAwCa,oBAAoB,GAAmB;IAChD,mBAAmB,EAAE;QACjB,IAAM,UAAU,GAAG,+FAA+F,CAAC;QACnH,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;KACtE;IACD,oBAAoB,EAAE;QAClB,IAAM,UAAU,GAAG,gGAAgG,CAAC;QACpH,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;KACtE;;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { ThrottlingUtils } from './ThrottlingUtils.js';
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkManager.js","sources":["../../src/network/NetworkManager.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { INetworkModule, NetworkRequestOptions } from \"./INetworkModule\";\r\nimport { RequestThumbprint } from \"./RequestThumbprint\";\r\nimport { ThrottlingUtils } from \"./ThrottlingUtils\";\r\nimport { CacheManager } from \"../cache/CacheManager\";\r\nimport { ClientAuthError } from \"../error/ClientAuthError\";\r\nimport { AuthError } from \"../error/AuthError\";\r\n\r\nexport type NetworkResponse<T> = {\r\n headers: Record<string, string>;\r\n body: T;\r\n status: number;\r\n};\r\n\r\nexport class NetworkManager {\r\n private networkClient: INetworkModule;\r\n private cacheManager: CacheManager;\r\n\r\n constructor(networkClient: INetworkModule, cacheManager: CacheManager) {\r\n this.networkClient = networkClient;\r\n this.cacheManager = cacheManager;\r\n }\r\n\r\n /**\r\n * Wraps sendPostRequestAsync with necessary preflight and postflight logic\r\n * @param thumbprint\r\n * @param tokenEndpoint\r\n * @param options\r\n */\r\n async sendPostRequest<T>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions): Promise<NetworkResponse<T>> {\r\n ThrottlingUtils.preProcess(this.cacheManager, thumbprint);\r\n\r\n let response;\r\n try {\r\n response = await this.networkClient.sendPostRequestAsync<T>(tokenEndpoint, options);\r\n } catch (e) {\r\n if (e instanceof AuthError) {\r\n throw e;\r\n } else {\r\n throw ClientAuthError.createNetworkError(tokenEndpoint, e);\r\n }\r\n }\r\n\r\n ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response);\r\n\r\n return response;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;IAsBI,wBAAY,aAA6B,EAAE,YAA0B;QACjE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;KACpC;;;;;;;IAQK,wCAAe,GAArB,UAAyB,UAA6B,EAAE,aAAqB,EAAE,OAA8B;;;;;;wBACzG,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;;;;wBAI3C,qBAAM,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAI,aAAa,EAAE,OAAO,CAAC,EAAA;;wBAAnF,QAAQ,GAAG,SAAwE,CAAC;;;;wBAEpF,IAAI,GAAC,YAAY,SAAS,EAAE;4BACxB,MAAM,GAAC,CAAC;yBACX;6BAAM;4BACH,MAAM,eAAe,CAAC,kBAAkB,CAAC,aAAa,EAAE,GAAC,CAAC,CAAC;yBAC9D;;wBAGL,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;wBAErE,sBAAO,QAAQ,EAAC;;;;KACnB;IACL,qBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"NetworkManager.js","sources":["../../src/network/NetworkManager.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INetworkModule, NetworkRequestOptions } from \"./INetworkModule\";\nimport { RequestThumbprint } from \"./RequestThumbprint\";\nimport { ThrottlingUtils } from \"./ThrottlingUtils\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ClientAuthError } from \"../error/ClientAuthError\";\nimport { AuthError } from \"../error/AuthError\";\n\nexport type NetworkResponse<T> = {\n headers: Record<string, string>;\n body: T;\n status: number;\n};\n\nexport class NetworkManager {\n private networkClient: INetworkModule;\n private cacheManager: CacheManager;\n\n constructor(networkClient: INetworkModule, cacheManager: CacheManager) {\n this.networkClient = networkClient;\n this.cacheManager = cacheManager;\n }\n\n /**\n * Wraps sendPostRequestAsync with necessary preflight and postflight logic\n * @param thumbprint\n * @param tokenEndpoint\n * @param options\n */\n async sendPostRequest<T>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions): Promise<NetworkResponse<T>> {\n ThrottlingUtils.preProcess(this.cacheManager, thumbprint);\n\n let response;\n try {\n response = await this.networkClient.sendPostRequestAsync<T>(tokenEndpoint, options);\n } catch (e) {\n if (e instanceof AuthError) {\n throw e;\n } else {\n throw ClientAuthError.createNetworkError(tokenEndpoint, e);\n }\n }\n\n ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response);\n\n return response;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;IAsBI,wBAAY,aAA6B,EAAE,YAA0B;QACjE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;KACpC;;;;;;;IAQK,wCAAe,GAArB,UAAyB,UAA6B,EAAE,aAAqB,EAAE,OAA8B;;;;;;wBACzG,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;;;;wBAI3C,qBAAM,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAI,aAAa,EAAE,OAAO,CAAC,EAAA;;wBAAnF,QAAQ,GAAG,SAAwE,CAAC;;;;wBAEpF,IAAI,GAAC,YAAY,SAAS,EAAE;4BACxB,MAAM,GAAC,CAAC;yBACX;6BAAM;4BACH,MAAM,eAAe,CAAC,kBAAkB,CAAC,aAAa,EAAE,GAAC,CAAC,CAAC;yBAC9D;;wBAGL,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;wBAErE,sBAAO,QAAQ,EAAC;;;;KACnB;IACL,qBAAC;AAAD,CAAC;;;;"}
@@ -7,9 +7,11 @@ export declare type RequestThumbprint = {
7
7
  authority: string;
8
8
  scopes: Array<string>;
9
9
  homeAccountIdentifier?: string;
10
+ claims?: string;
10
11
  authenticationScheme?: AuthenticationScheme;
11
12
  resourceRequestMethod?: string;
12
13
  resourceRequestUri?: string;
13
14
  shrClaims?: string;
15
+ sshKid?: string;
14
16
  };
15
17
  //# sourceMappingURL=RequestThumbprint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"RequestThumbprint.d.ts","sourceRoot":"","sources":["../../src/network/RequestThumbprint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC5B,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C,YAAY,EAAE,MAAM,GAAG,MAAM;IAU1D,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,qBAAqB,CAAC,EAAE,MAAM,GAAG,OAAO;CAiBzI"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  import { ThrottlingConstants, CacheSchemaType, Constants, HeaderNames } from '../utils/Constants.js';
4
4
  import { ServerError } from '../error/ServerError.js';
@@ -84,10 +84,12 @@ var ThrottlingUtils = /** @class */ (function () {
84
84
  authority: request.authority,
85
85
  scopes: request.scopes,
86
86
  homeAccountIdentifier: homeAccountIdentifier,
87
+ claims: request.claims,
87
88
  authenticationScheme: request.authenticationScheme,
88
89
  resourceRequestMethod: request.resourceRequestMethod,
89
90
  resourceRequestUri: request.resourceRequestUri,
90
- shrClaims: request.shrClaims
91
+ shrClaims: request.shrClaims,
92
+ sshKid: request.sshKid
91
93
  };
92
94
  var key = this.generateThrottlingStorageKey(thumbprint);
93
95
  return cacheManager.removeItem(key, CacheSchemaType.THROTTLING);
@@ -1 +1 @@
1
- {"version":3,"file":"ThrottlingUtils.js","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { NetworkResponse } from \"./NetworkManager\";\r\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\r\nimport { HeaderNames, CacheSchemaType, ThrottlingConstants, Constants } from \"../utils/Constants\";\r\nimport { CacheManager } from \"../cache/CacheManager\";\r\nimport { ServerError } from \"../error/ServerError\";\r\nimport { RequestThumbprint } from \"./RequestThumbprint\";\r\nimport { ThrottlingEntity } from \"../cache/entities/ThrottlingEntity\";\r\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\r\n\r\nexport class ThrottlingUtils {\r\n\r\n /**\r\n * Prepares a RequestThumbprint to be stored as a key.\r\n * @param thumbprint\r\n */\r\n static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string {\r\n return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`;\r\n }\r\n\r\n /**\r\n * Performs necessary throttling checks before a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n */\r\n static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint): void {\r\n const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);\r\n const value = cacheManager.getThrottlingCache(key);\r\n\r\n if (value) {\r\n if (value.throttleTime < Date.now()) {\r\n cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\r\n return;\r\n }\r\n throw new ServerError(value.errorCodes?.join(\" \") || Constants.EMPTY_STRING, value.errorMessage, value.subError);\r\n }\r\n }\r\n\r\n /**\r\n * Performs necessary throttling checks after a network request.\r\n * @param cacheManager\r\n * @param thumbprint\r\n * @param response\r\n */\r\n static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse<ServerAuthorizationTokenResponse>): void {\r\n if (ThrottlingUtils.checkResponseStatus(response) || ThrottlingUtils.checkResponseForRetryAfter(response)) {\r\n const thumbprintValue: ThrottlingEntity = {\r\n throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),\r\n error: response.body.error,\r\n errorCodes: response.body.error_codes,\r\n errorMessage: response.body.error_description,\r\n subError: response.body.suberror\r\n };\r\n cacheManager.setThrottlingCache(\r\n ThrottlingUtils.generateThrottlingStorageKey(thumbprint),\r\n thumbprintValue\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Checks a NetworkResponse object's status codes against 429 or 5xx\r\n * @param response\r\n */\r\n static checkResponseStatus(response: NetworkResponse<ServerAuthorizationTokenResponse>): boolean {\r\n return response.status === 429 || response.status >= 500 && response.status < 600;\r\n }\r\n\r\n /**\r\n * Checks a NetworkResponse object's RetryAfter header\r\n * @param response\r\n */\r\n static checkResponseForRetryAfter(response: NetworkResponse<ServerAuthorizationTokenResponse>): boolean {\r\n if (response.headers) {\r\n return response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && (response.status < 200 || response.status >= 300);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.\r\n * @param throttleTime\r\n */\r\n static calculateThrottleTime(throttleTime: number): number {\r\n const time = throttleTime <= 0 ? 0 : throttleTime;\r\n\r\n const currentSeconds = Date.now() / 1000;\r\n return Math.floor(Math.min(\r\n currentSeconds + (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS),\r\n currentSeconds + ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS\r\n ) * 1000);\r\n }\r\n\r\n static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): boolean {\r\n const thumbprint: RequestThumbprint = {\r\n clientId: clientId,\r\n authority: request.authority,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: homeAccountIdentifier,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims\r\n };\r\n\r\n const key = this.generateThrottlingStorageKey(thumbprint);\r\n return cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;;;IAcA;KAkGC;;;;;IA5FU,4CAA4B,GAAnC,UAAoC,UAA6B;QAC7D,OAAU,mBAAmB,CAAC,iBAAiB,SAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAG,CAAC;KACnF;;;;;;IAOM,0BAAU,GAAjB,UAAkB,YAA0B,EAAE,UAA6B;;QACvE,IAAM,GAAG,GAAG,eAAe,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACrE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;"}
1
+ {"version":3,"file":"ThrottlingUtils.js","sources":["../../src/network/ThrottlingUtils.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { NetworkResponse } from \"./NetworkManager\";\nimport { ServerAuthorizationTokenResponse } from \"../response/ServerAuthorizationTokenResponse\";\nimport { HeaderNames, CacheSchemaType, ThrottlingConstants, Constants } from \"../utils/Constants\";\nimport { CacheManager } from \"../cache/CacheManager\";\nimport { ServerError } from \"../error/ServerError\";\nimport { RequestThumbprint } from \"./RequestThumbprint\";\nimport { ThrottlingEntity } from \"../cache/entities/ThrottlingEntity\";\nimport { BaseAuthRequest } from \"../request/BaseAuthRequest\";\n\nexport class ThrottlingUtils {\n\n /**\n * Prepares a RequestThumbprint to be stored as a key.\n * @param thumbprint\n */\n static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string {\n return `${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(thumbprint)}`;\n }\n\n /**\n * Performs necessary throttling checks before a network request.\n * @param cacheManager\n * @param thumbprint\n */\n static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint): void {\n const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint);\n const value = cacheManager.getThrottlingCache(key);\n\n if (value) {\n if (value.throttleTime < Date.now()) {\n cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\n return;\n }\n throw new ServerError(value.errorCodes?.join(\" \") || Constants.EMPTY_STRING, value.errorMessage, value.subError);\n }\n }\n\n /**\n * Performs necessary throttling checks after a network request.\n * @param cacheManager\n * @param thumbprint\n * @param response\n */\n static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse<ServerAuthorizationTokenResponse>): void {\n if (ThrottlingUtils.checkResponseStatus(response) || ThrottlingUtils.checkResponseForRetryAfter(response)) {\n const thumbprintValue: ThrottlingEntity = {\n throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),\n error: response.body.error,\n errorCodes: response.body.error_codes,\n errorMessage: response.body.error_description,\n subError: response.body.suberror\n };\n cacheManager.setThrottlingCache(\n ThrottlingUtils.generateThrottlingStorageKey(thumbprint),\n thumbprintValue\n );\n }\n }\n\n /**\n * Checks a NetworkResponse object's status codes against 429 or 5xx\n * @param response\n */\n static checkResponseStatus(response: NetworkResponse<ServerAuthorizationTokenResponse>): boolean {\n return response.status === 429 || response.status >= 500 && response.status < 600;\n }\n\n /**\n * Checks a NetworkResponse object's RetryAfter header\n * @param response\n */\n static checkResponseForRetryAfter(response: NetworkResponse<ServerAuthorizationTokenResponse>): boolean {\n if (response.headers) {\n return response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) && (response.status < 200 || response.status >= 300);\n }\n return false;\n }\n\n /**\n * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.\n * @param throttleTime\n */\n static calculateThrottleTime(throttleTime: number): number {\n const time = throttleTime <= 0 ? 0 : throttleTime;\n\n const currentSeconds = Date.now() / 1000;\n return Math.floor(Math.min(\n currentSeconds + (time || ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS),\n currentSeconds + ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS\n ) * 1000);\n }\n\n static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): boolean {\n const thumbprint: RequestThumbprint = {\n clientId: clientId,\n authority: request.authority,\n scopes: request.scopes,\n homeAccountIdentifier: homeAccountIdentifier,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n\n const key = this.generateThrottlingStorageKey(thumbprint);\n return cacheManager.removeItem(key, CacheSchemaType.THROTTLING);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;;IAcA;KAoGC;;;;;IA9FU,4CAA4B,GAAnC,UAAoC,UAA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,EAAE,OAAO,CAAC,kBAAkB;YAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC;QAEF,IAAM,GAAG,GAAG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC1D,OAAO,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;KACnE;IACL,sBAAC;AAAD,CAAC;;;;"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-common";
2
- export declare const version = "5.0.1";
2
+ export declare const version = "6.1.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  /* eslint-disable header/header */
4
4
  var name = "@azure/msal-common";
5
- var version = "5.0.1";
5
+ var version = "6.1.0";
6
6
 
7
7
  export { name, version };
8
8
  //# sourceMappingURL=packageMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\r\nexport const name = \"@azure/msal-common\";\r\nexport const version = \"5.0.1\";\r\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,qBAAqB;IAC5B,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\nexport const name = \"@azure/msal-common\";\nexport const version = \"6.1.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,qBAAqB;IAC5B,OAAO,GAAG;;;;"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This is a helper class that parses supported HTTP response authentication headers to extract and return
3
+ * header challenge values that can be used outside the basic authorization flows.
4
+ */
5
+ export declare class AuthenticationHeaderParser {
6
+ private headers;
7
+ constructor(headers: Record<string, string>);
8
+ /**
9
+ * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
10
+ * @returns
11
+ */
12
+ getShrNonce(): string;
13
+ /**
14
+ * Parses an HTTP header's challenge set into a key/value map.
15
+ * @param header
16
+ * @returns
17
+ */
18
+ private parseChallenges;
19
+ }
20
+ //# sourceMappingURL=AuthenticationHeaderParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthenticationHeaderParser.d.ts","sourceRoot":"","sources":["../../src/request/AuthenticationHeaderParser.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3C;;;OAGG;IACH,WAAW,IAAI,MAAM;IAyBrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;CAa1B"}
@@ -0,0 +1,64 @@
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
+ 'use strict';
3
+ import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
4
+ import { HeaderNames } from '../utils/Constants.js';
5
+
6
+ /*
7
+ * Copyright (c) Microsoft Corporation. All rights reserved.
8
+ * Licensed under the MIT License.
9
+ */
10
+ /**
11
+ * This is a helper class that parses supported HTTP response authentication headers to extract and return
12
+ * header challenge values that can be used outside the basic authorization flows.
13
+ */
14
+ var AuthenticationHeaderParser = /** @class */ (function () {
15
+ function AuthenticationHeaderParser(headers) {
16
+ this.headers = headers;
17
+ }
18
+ /**
19
+ * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
20
+ * @returns
21
+ */
22
+ AuthenticationHeaderParser.prototype.getShrNonce = function () {
23
+ // Attempt to parse nonce from Authentiacation-Info
24
+ var authenticationInfo = this.headers[HeaderNames.AuthenticationInfo];
25
+ if (authenticationInfo) {
26
+ var authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
27
+ if (authenticationInfoChallenges.nextnonce) {
28
+ return authenticationInfoChallenges.nextnonce;
29
+ }
30
+ throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.AuthenticationInfo, "nextnonce challenge is missing.");
31
+ }
32
+ // Attempt to parse nonce from WWW-Authenticate
33
+ var wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate];
34
+ if (wwwAuthenticate) {
35
+ var wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
36
+ if (wwwAuthenticateChallenges.nonce) {
37
+ return wwwAuthenticateChallenges.nonce;
38
+ }
39
+ throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.WWWAuthenticate, "nonce challenge is missing.");
40
+ }
41
+ // If neither header is present, throw missing headers error
42
+ throw ClientConfigurationError.createMissingNonceAuthenticationHeadersError();
43
+ };
44
+ /**
45
+ * Parses an HTTP header's challenge set into a key/value map.
46
+ * @param header
47
+ * @returns
48
+ */
49
+ AuthenticationHeaderParser.prototype.parseChallenges = function (header) {
50
+ var schemeSeparator = header.indexOf(" ");
51
+ var challenges = header.substr(schemeSeparator + 1).split(",");
52
+ var challengeMap = {};
53
+ challenges.forEach(function (challenge) {
54
+ var _a = challenge.split("="), key = _a[0], value = _a[1];
55
+ // Remove escaped quotation marks (', ") from challenge string to keep only the challenge value
56
+ challengeMap[key] = unescape(value.replace(/['"]+/g, ""));
57
+ });
58
+ return challengeMap;
59
+ };
60
+ return AuthenticationHeaderParser;
61
+ }());
62
+
63
+ export { AuthenticationHeaderParser };
64
+ //# sourceMappingURL=AuthenticationHeaderParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthenticationHeaderParser.js","sources":["../../src/request/AuthenticationHeaderParser.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { HeaderNames } from \"../utils/Constants\";\n\ntype WWWAuthenticateChallenges = {\n nonce?: string,\n};\n\ntype AuthenticationInfoChallenges = {\n nextnonce?: string\n};\n\n/**\n * This is a helper class that parses supported HTTP response authentication headers to extract and return\n * header challenge values that can be used outside the basic authorization flows.\n */\nexport class AuthenticationHeaderParser {\n private headers: Record<string, string>;\n\n constructor(headers: Record<string, string>) {\n this.headers = headers;\n }\n\n /**\n * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.\n * @returns \n */\n getShrNonce(): string {\n // Attempt to parse nonce from Authentiacation-Info\n const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo];\n if (authenticationInfo) {\n const authenticationInfoChallenges = this.parseChallenges<AuthenticationInfoChallenges>(authenticationInfo);\n if (authenticationInfoChallenges.nextnonce) {\n return authenticationInfoChallenges.nextnonce;\n }\n throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.AuthenticationInfo, \"nextnonce challenge is missing.\");\n }\n\n // Attempt to parse nonce from WWW-Authenticate\n const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate];\n if (wwwAuthenticate) {\n const wwwAuthenticateChallenges = this.parseChallenges<WWWAuthenticateChallenges>(wwwAuthenticate); \n if (wwwAuthenticateChallenges.nonce){\n return wwwAuthenticateChallenges.nonce;\n }\n throw ClientConfigurationError.createInvalidAuthenticationHeaderError(HeaderNames.WWWAuthenticate, \"nonce challenge is missing.\");\n }\n\n // If neither header is present, throw missing headers error\n throw ClientConfigurationError.createMissingNonceAuthenticationHeadersError();\n }\n\n /**\n * Parses an HTTP header's challenge set into a key/value map.\n * @param header \n * @returns \n */\n private parseChallenges<T>(header: string): T {\n const schemeSeparator = header.indexOf(\" \");\n const challenges = header.substr(schemeSeparator + 1).split(\",\");\n const challengeMap = {} as T;\n\n challenges.forEach((challenge: string) => {\n const [ key, value ] = challenge.split(\"=\");\n // Remove escaped quotation marks (', \") from challenge string to keep only the challenge value\n challengeMap[key] = unescape(value.replace(/['\"]+/g, \"\"));\n });\n\n return challengeMap;\n }\n}\n"],"names":[],"mappings":";;;;;AAAA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nC,GAAG,QAAA,EAAE,KAAK,QAAyB,CAAC;;YAE5C,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;SAC7D,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;KACvB;IACL,iCAAC;AAAD,CAAC;;;;"}
@@ -1,14 +1,20 @@
1
1
  import { AuthenticationScheme } from "../utils/Constants";
2
+ import { AzureCloudOptions } from "../config/ClientConfiguration";
2
3
  /**
3
4
  * BaseAuthRequest
4
5
  * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times.
5
6
  * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
6
7
  * - scopes - Array of scopes the application is requesting access to.
7
- * - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop".
8
+ * - authenticationScheme - The type of token retrieved. Defaults to "Bearer". Can also be type "pop" or "SSH".
8
9
  * - claims - A stringified claims request which will be added to all /authorize and /token calls
9
10
  * - shrClaims - A stringified claims object which will be added to a Signed HTTP Request
10
- * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
11
- * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
11
+ * - shrNonce - A server-generated timestamp that has been encrypted and base64URL encoded, which will be added to a Signed HTTP Request.
12
+ * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
13
+ * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
14
+ * - sshJwk - A stringified JSON Web Key representing a public key that can be signed by an SSH certificate.
15
+ * - sshKid - Key ID that uniquely identifies the SSH public key mentioned above.
16
+ * - azureCloudOptions - Convenience string enums for users to provide public/sovereign cloud ids
17
+ * - requestedClaimsHash - SHA 256 hash string of the requested claims string, used as part of an access token cache key so tokens can be filtered by requested claims
12
18
  */
13
19
  export declare type BaseAuthRequest = {
14
20
  authority: string;
@@ -17,7 +23,12 @@ export declare type BaseAuthRequest = {
17
23
  authenticationScheme?: AuthenticationScheme;
18
24
  claims?: string;
19
25
  shrClaims?: string;
26
+ shrNonce?: string;
20
27
  resourceRequestMethod?: string;
21
28
  resourceRequestUri?: string;
29
+ sshJwk?: string;
30
+ sshKid?: string;
31
+ azureCloudOptions?: AzureCloudOptions;
32
+ requestedClaimsHash?: string;
22
33
  };
23
34
  //# sourceMappingURL=BaseAuthRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,oBAAY,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
@@ -13,12 +13,15 @@ import { CcsCredential } from "../account/CcsCredential";
13
13
  * - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
14
14
  * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
15
15
  * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
16
+ * - enableSpaAuthCode - Enables the acqusition of a spa authorization code (confidential clients only)
16
17
  */
17
18
  export declare type CommonAuthorizationCodeRequest = BaseAuthRequest & {
18
19
  code: string;
19
20
  redirectUri: string;
20
21
  codeVerifier?: string;
21
22
  tokenQueryParameters?: StringDict;
23
+ tokenBodyParameters?: StringDict;
24
+ enableSpaAuthorizationCode?: boolean;
22
25
  clientInfo?: string;
23
26
  ccsCredential?: CcsCredential;
24
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,oBAAY,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"CommonAuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;;;;;;;;;GAaG;AACH,oBAAY,8BAA8B,GAAG,eAAe,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,CAAC"}
@@ -7,6 +7,7 @@ import { StringDict } from "../utils/MsalTypes";
7
7
  * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
8
8
  * - idTokenHint - ID Token used by B2C to validate logout if required by the policy
9
9
  * - state - A value included in the request to the logout endpoint which will be returned in the query string upon post logout redirection
10
+ * - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout
10
11
  */
11
12
  export declare type CommonEndSessionRequest = {
12
13
  correlationId: string;
@@ -14,6 +15,7 @@ export declare type CommonEndSessionRequest = {
14
15
  postLogoutRedirectUri?: string | null;
15
16
  idTokenHint?: string;
16
17
  state?: string;
18
+ logoutHint?: string;
17
19
  extraQueryParameters?: StringDict;
18
20
  };
19
21
  //# sourceMappingURL=CommonEndSessionRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommonEndSessionRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonEndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,oBAAY,uBAAuB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,UAAU,CAAA;CACpC,CAAC"}
1
+ {"version":3,"file":"CommonEndSessionRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonEndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;;GAQG;AACH,oBAAY,uBAAuB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAA;CACpC,CAAC"}
@@ -179,6 +179,10 @@ export declare class RequestParameterBuilder {
179
179
  * @param cnfString
180
180
  */
181
181
  addPopToken(cnfString: string): void;
182
+ /**
183
+ * add SSH JWK and key ID to query params
184
+ */
185
+ addSshJwk(sshJwkString: string): void;
182
186
  /**
183
187
  * add server telemetry fields
184
188
  * @param serverTelemetryManager
@@ -188,6 +192,10 @@ export declare class RequestParameterBuilder {
188
192
  * Adds parameter that indicates to the server that throttling is supported
189
193
  */
190
194
  addThrottling(): void;
195
+ /**
196
+ * Adds logout_hint parameter for "silent" logout which prevent server account picker
197
+ */
198
+ addLogoutHint(logoutHint: string): void;
191
199
  /**
192
200
  * Utility to create a URL from the params map
193
201
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParameterBuilder.d.ts","sourceRoot":"","sources":["../../src/request/RequestParameterBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiC,YAAY,EAAgJ,MAAM,oBAAoB,CAAC;AAG/N,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,UAAU,CAAsB;;IAMxC;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAM3B;;;OAGG;IACH,eAAe,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI;IAOlD;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,GAAE,OAAc,GAAG,IAAI;IAMhE;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKzC;;;OAGG;IACH,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKnD;;;OAGG;IACH,cAA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AAsB,EAAE,sBAAsB,GAAG,IAAI;IAKxE;;OAEG;IACH,aAAa,IAAI,IAAI;IAIrB;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIvC;;OAEG;IACH,iBAAiB,IAAI,MAAM;CAS9B"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v5.0.1 2021-10-05 */
1
+ /*! @azure/msal-common v6.1.0 2022-02-08 */
2
2
  'use strict';
3
3
  import { __spreadArrays } from '../_virtual/_tslib.js';
4
4
  import { AADServerParamKeys, Constants, ResponseMode, OIDC_DEFAULT_SCOPES, SSOTypes, HeaderNames, CLIENT_INFO, ClaimsRequestKeys, PasswordGrantConstants, AuthenticationScheme, ThrottlingConstants } from '../utils/Constants.js';
@@ -309,6 +309,15 @@ var RequestParameterBuilder = /** @class */ (function () {
309
309
  this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));
310
310
  }
311
311
  };
312
+ /**
313
+ * add SSH JWK and key ID to query params
314
+ */
315
+ RequestParameterBuilder.prototype.addSshJwk = function (sshJwkString) {
316
+ if (!StringUtils.isEmpty(sshJwkString)) {
317
+ this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.SSH);
318
+ this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));
319
+ }
320
+ };
312
321
  /**
313
322
  * add server telemetry fields
314
323
  * @param serverTelemetryManager
@@ -323,6 +332,12 @@ var RequestParameterBuilder = /** @class */ (function () {
323
332
  RequestParameterBuilder.prototype.addThrottling = function () {
324
333
  this.parameters.set(AADServerParamKeys.X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);
325
334
  };
335
+ /**
336
+ * Adds logout_hint parameter for "silent" logout which prevent server account picker
337
+ */
338
+ RequestParameterBuilder.prototype.addLogoutHint = function (logoutHint) {
339
+ this.parameters.set(AADServerParamKeys.LOGOUT_HINT, encodeURIComponent(logoutHint));
340
+ };
326
341
  /**
327
342
  * Utility to create a URL from the params map
328
343
  */