@azure/msal-common 6.1.0 → 6.3.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 (138) hide show
  1. package/dist/_virtual/_tslib.js +1 -1
  2. package/dist/account/AccountInfo.d.ts +6 -1
  3. package/dist/account/AccountInfo.d.ts.map +1 -1
  4. package/dist/account/AuthToken.js +1 -1
  5. package/dist/account/CcsCredential.js +1 -1
  6. package/dist/account/ClientInfo.js +1 -1
  7. package/dist/account/TokenClaims.d.ts +29 -0
  8. package/dist/account/TokenClaims.d.ts.map +1 -1
  9. package/dist/authority/Authority.js +1 -1
  10. package/dist/authority/AuthorityFactory.js +1 -1
  11. package/dist/authority/AuthorityOptions.d.ts +1 -0
  12. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  13. package/dist/authority/AuthorityOptions.js +3 -1
  14. package/dist/authority/AuthorityOptions.js.map +1 -1
  15. package/dist/authority/AuthorityType.js +1 -1
  16. package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
  17. package/dist/authority/OpenIdConfigResponse.js +1 -1
  18. package/dist/authority/ProtocolMode.js +1 -1
  19. package/dist/authority/RegionDiscovery.js +1 -1
  20. package/dist/cache/CacheManager.d.ts +1 -1
  21. package/dist/cache/CacheManager.js +3 -3
  22. package/dist/cache/CacheManager.js.map +1 -1
  23. package/dist/cache/entities/AccessTokenEntity.js +1 -1
  24. package/dist/cache/entities/AccountEntity.d.ts +3 -1
  25. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  26. package/dist/cache/entities/AccountEntity.js +16 -12
  27. package/dist/cache/entities/AccountEntity.js.map +1 -1
  28. package/dist/cache/entities/AppMetadataEntity.js +1 -1
  29. package/dist/cache/entities/AuthorityMetadataEntity.js +1 -1
  30. package/dist/cache/entities/CacheRecord.js +1 -1
  31. package/dist/cache/entities/CredentialEntity.js +5 -5
  32. package/dist/cache/entities/CredentialEntity.js.map +1 -1
  33. package/dist/cache/entities/IdTokenEntity.js +1 -1
  34. package/dist/cache/entities/RefreshTokenEntity.js +1 -1
  35. package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
  36. package/dist/cache/entities/ThrottlingEntity.js +1 -1
  37. package/dist/cache/persistence/TokenCacheContext.js +1 -1
  38. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  39. package/dist/client/AuthorizationCodeClient.js +119 -93
  40. package/dist/client/AuthorizationCodeClient.js.map +1 -1
  41. package/dist/client/BaseClient.js +1 -1
  42. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  43. package/dist/client/ClientCredentialClient.js +4 -3
  44. package/dist/client/ClientCredentialClient.js.map +1 -1
  45. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  46. package/dist/client/DeviceCodeClient.js +2 -1
  47. package/dist/client/DeviceCodeClient.js.map +1 -1
  48. package/dist/client/OnBehalfOfClient.js +3 -2
  49. package/dist/client/OnBehalfOfClient.js.map +1 -1
  50. package/dist/client/RefreshTokenClient.js +2 -1
  51. package/dist/client/RefreshTokenClient.js.map +1 -1
  52. package/dist/client/SilentFlowClient.js +1 -1
  53. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  54. package/dist/client/UsernamePasswordClient.js +3 -1
  55. package/dist/client/UsernamePasswordClient.js.map +1 -1
  56. package/dist/config/ClientConfiguration.d.ts +16 -1
  57. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  58. package/dist/config/ClientConfiguration.js +14 -7
  59. package/dist/config/ClientConfiguration.js.map +1 -1
  60. package/dist/crypto/ICrypto.d.ts +4 -2
  61. package/dist/crypto/ICrypto.d.ts.map +1 -1
  62. package/dist/crypto/ICrypto.js +1 -1
  63. package/dist/crypto/ICrypto.js.map +1 -1
  64. package/dist/crypto/IGuidGenerator.d.ts +5 -0
  65. package/dist/crypto/IGuidGenerator.d.ts.map +1 -0
  66. package/dist/crypto/PopTokenGenerator.d.ts +30 -0
  67. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  68. package/dist/crypto/PopTokenGenerator.js +38 -2
  69. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  70. package/dist/error/AuthError.js +3 -3
  71. package/dist/error/AuthError.js.map +1 -1
  72. package/dist/error/ClientAuthError.js +1 -1
  73. package/dist/error/ClientConfigurationError.js +1 -1
  74. package/dist/error/InteractionRequiredAuthError.js +1 -1
  75. package/dist/error/ServerError.js +1 -1
  76. package/dist/index.cjs.js +659 -148
  77. package/dist/index.cjs.js.map +1 -1
  78. package/dist/index.d.ts +7 -1
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +4 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/logger/Logger.js +13 -13
  83. package/dist/logger/Logger.js.map +1 -1
  84. package/dist/network/INetworkModule.js +1 -1
  85. package/dist/network/NetworkManager.js +1 -1
  86. package/dist/network/ThrottlingUtils.js +1 -1
  87. package/dist/packageMetadata.d.ts +1 -1
  88. package/dist/packageMetadata.js +2 -2
  89. package/dist/packageMetadata.js.map +1 -1
  90. package/dist/request/AuthenticationHeaderParser.js +3 -3
  91. package/dist/request/AuthenticationHeaderParser.js.map +1 -1
  92. package/dist/request/CommonAuthorizationUrlRequest.d.ts +1 -0
  93. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  94. package/dist/request/RequestParameterBuilder.d.ts +14 -1
  95. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  96. package/dist/request/RequestParameterBuilder.js +31 -3
  97. package/dist/request/RequestParameterBuilder.js.map +1 -1
  98. package/dist/request/RequestValidator.js +1 -1
  99. package/dist/request/ScopeSet.js +4 -4
  100. package/dist/request/ScopeSet.js.map +1 -1
  101. package/dist/response/AuthenticationResult.d.ts +1 -0
  102. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  103. package/dist/response/ResponseHandler.d.ts.map +1 -1
  104. package/dist/response/ResponseHandler.js +6 -5
  105. package/dist/response/ResponseHandler.js.map +1 -1
  106. package/dist/response/ServerAuthorizationCodeResponse.d.ts +1 -0
  107. package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -1
  108. package/dist/telemetry/performance/IPerformanceClient.d.ts +22 -0
  109. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  110. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  111. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  112. package/dist/telemetry/performance/PerformanceClient.d.ts +125 -0
  113. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  114. package/dist/telemetry/performance/PerformanceClient.js +275 -0
  115. package/dist/telemetry/performance/PerformanceClient.js.map +1 -0
  116. package/dist/telemetry/performance/PerformanceEvent.d.ts +203 -0
  117. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  118. package/dist/telemetry/performance/PerformanceEvent.js +100 -0
  119. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
  120. package/dist/telemetry/performance/StubPerformanceClient.d.ts +13 -0
  121. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  122. package/dist/telemetry/performance/StubPerformanceClient.js +37 -0
  123. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
  124. package/dist/telemetry/server/ServerTelemetryManager.js +4 -4
  125. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
  126. package/dist/url/UrlString.js +2 -2
  127. package/dist/url/UrlString.js.map +1 -1
  128. package/dist/utils/Constants.d.ts +5 -0
  129. package/dist/utils/Constants.d.ts.map +1 -1
  130. package/dist/utils/Constants.js +7 -2
  131. package/dist/utils/Constants.js.map +1 -1
  132. package/dist/utils/ProtocolUtils.js +3 -3
  133. package/dist/utils/ProtocolUtils.js.map +1 -1
  134. package/dist/utils/StringUtils.js +1 -1
  135. package/dist/utils/TimeUtils.js +1 -1
  136. package/package.json +2 -4
  137. package/CHANGELOG.json +0 -1319
  138. package/CHANGELOG.md +0 -504
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, AzureCloudOptions } from "./config/ClientConfiguration";
12
+ export { AuthOptions, SystemOptions, LoggerOptions, DEFAULT_SYSTEM_OPTIONS, AzureCloudOptions, ApplicationTelemetry } from "./config/ClientConfiguration";
13
13
  export { ClientConfiguration } from "./config/ClientConfiguration";
14
14
  export { AccountInfo } from "./account/AccountInfo";
15
15
  export { AuthToken } from "./account/AuthToken";
@@ -44,6 +44,7 @@ export { IUri } from "./url/IUri";
44
44
  export { UrlString } from "./url/UrlString";
45
45
  export { ICrypto, PkceCodes, DEFAULT_CRYPTO_IMPLEMENTATION, SignedHttpRequestParameters } from "./crypto/ICrypto";
46
46
  export { SignedHttpRequest } from "./crypto/SignedHttpRequest";
47
+ export { IGuidGenerator } from "./crypto/IGuidGenerator";
47
48
  export { BaseAuthRequest } from "./request/BaseAuthRequest";
48
49
  export { CommonAuthorizationUrlRequest } from "./request/CommonAuthorizationUrlRequest";
49
50
  export { CommonAuthorizationCodeRequest } from "./request/CommonAuthorizationCodeRequest";
@@ -77,6 +78,11 @@ export { ProtocolUtils, RequestStateObject, LibraryStateObject } from "./utils/P
77
78
  export { TimeUtils } from "./utils/TimeUtils";
78
79
  export { ServerTelemetryManager } from "./telemetry/server/ServerTelemetryManager";
79
80
  export { ServerTelemetryRequest } from "./telemetry/server/ServerTelemetryRequest";
81
+ export { IPerformanceClient, PerformanceCallbackFunction, InProgressPerformanceEvent } from "./telemetry/performance/IPerformanceClient";
82
+ export { PerformanceEvent, PerformanceEvents, PerformanceEventStatus } from "./telemetry/performance/PerformanceEvent";
83
+ export { IPerformanceMeasurement } from "./telemetry/performance/IPerformanceMeasurement";
84
+ export { PerformanceClient } from "./telemetry/performance/PerformanceClient";
85
+ export { StubPerformanceClient } from "./telemetry/performance/StubPerformanceClient";
80
86
  export { PopTokenGenerator } from "./crypto/PopTokenGenerator";
81
87
  export { version } from "./packageMetadata";
82
88
  //# sourceMappingURL=index.d.ts.map
@@ -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,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACpI,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,yBAAyB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC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@azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  export { AuthorizationCodeClient } from './client/AuthorizationCodeClient.js';
4
4
  export { DeviceCodeClient } from './client/DeviceCodeClient.js';
@@ -44,6 +44,9 @@ export { StringUtils } from './utils/StringUtils.js';
44
44
  export { ProtocolUtils } from './utils/ProtocolUtils.js';
45
45
  export { TimeUtils } from './utils/TimeUtils.js';
46
46
  export { ServerTelemetryManager } from './telemetry/server/ServerTelemetryManager.js';
47
+ export { PerformanceEventStatus, PerformanceEvents } from './telemetry/performance/PerformanceEvent.js';
48
+ export { PerformanceClient } from './telemetry/performance/PerformanceClient.js';
49
+ export { StubPerformanceClient } from './telemetry/performance/StubPerformanceClient.js';
47
50
  export { PopTokenGenerator } from './crypto/PopTokenGenerator.js';
48
51
  export { version } from './packageMetadata.js';
49
52
  //# sourceMappingURL=index.js.map
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 v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { StringUtils } from '../utils/StringUtils.js';
4
4
  import { Constants } from '../utils/Constants.js';
@@ -31,7 +31,7 @@ var Logger = /** @class */ (function () {
31
31
  this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;
32
32
  this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;
33
33
  this.level = typeof (loggerOptions.logLevel) === "number" ? loggerOptions.logLevel : LogLevel.Info;
34
- this.correlationId = loggerOptions.correlationId || "";
34
+ this.correlationId = loggerOptions.correlationId || Constants.EMPTY_STRING;
35
35
  this.packageName = packageName || Constants.EMPTY_STRING;
36
36
  this.packageVersion = packageVersion || Constants.EMPTY_STRING;
37
37
  }
@@ -61,7 +61,7 @@ var Logger = /** @class */ (function () {
61
61
  logHeader = "[" + timestamp + "]";
62
62
  }
63
63
  var log = logHeader + " : " + this.packageName + "@" + this.packageVersion + " : " + LogLevel[options.logLevel] + " - " + logMessage;
64
- // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": ""}${options.context ? `:${options.context}` : ""}`)(logMessage);
64
+ // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage);
65
65
  this.executeCallback(options.logLevel, log, options.containsPii || false);
66
66
  };
67
67
  /**
@@ -79,7 +79,7 @@ var Logger = /** @class */ (function () {
79
79
  this.logMessage(message, {
80
80
  logLevel: LogLevel.Error,
81
81
  containsPii: false,
82
- correlationId: correlationId || ""
82
+ correlationId: correlationId || Constants.EMPTY_STRING
83
83
  });
84
84
  };
85
85
  /**
@@ -89,7 +89,7 @@ var Logger = /** @class */ (function () {
89
89
  this.logMessage(message, {
90
90
  logLevel: LogLevel.Error,
91
91
  containsPii: true,
92
- correlationId: correlationId || ""
92
+ correlationId: correlationId || Constants.EMPTY_STRING
93
93
  });
94
94
  };
95
95
  /**
@@ -99,7 +99,7 @@ var Logger = /** @class */ (function () {
99
99
  this.logMessage(message, {
100
100
  logLevel: LogLevel.Warning,
101
101
  containsPii: false,
102
- correlationId: correlationId || ""
102
+ correlationId: correlationId || Constants.EMPTY_STRING
103
103
  });
104
104
  };
105
105
  /**
@@ -109,7 +109,7 @@ var Logger = /** @class */ (function () {
109
109
  this.logMessage(message, {
110
110
  logLevel: LogLevel.Warning,
111
111
  containsPii: true,
112
- correlationId: correlationId || ""
112
+ correlationId: correlationId || Constants.EMPTY_STRING
113
113
  });
114
114
  };
115
115
  /**
@@ -119,7 +119,7 @@ var Logger = /** @class */ (function () {
119
119
  this.logMessage(message, {
120
120
  logLevel: LogLevel.Info,
121
121
  containsPii: false,
122
- correlationId: correlationId || ""
122
+ correlationId: correlationId || Constants.EMPTY_STRING
123
123
  });
124
124
  };
125
125
  /**
@@ -129,7 +129,7 @@ var Logger = /** @class */ (function () {
129
129
  this.logMessage(message, {
130
130
  logLevel: LogLevel.Info,
131
131
  containsPii: true,
132
- correlationId: correlationId || ""
132
+ correlationId: correlationId || Constants.EMPTY_STRING
133
133
  });
134
134
  };
135
135
  /**
@@ -139,7 +139,7 @@ var Logger = /** @class */ (function () {
139
139
  this.logMessage(message, {
140
140
  logLevel: LogLevel.Verbose,
141
141
  containsPii: false,
142
- correlationId: correlationId || ""
142
+ correlationId: correlationId || Constants.EMPTY_STRING
143
143
  });
144
144
  };
145
145
  /**
@@ -149,7 +149,7 @@ var Logger = /** @class */ (function () {
149
149
  this.logMessage(message, {
150
150
  logLevel: LogLevel.Verbose,
151
151
  containsPii: true,
152
- correlationId: correlationId || ""
152
+ correlationId: correlationId || Constants.EMPTY_STRING
153
153
  });
154
154
  };
155
155
  /**
@@ -159,7 +159,7 @@ var Logger = /** @class */ (function () {
159
159
  this.logMessage(message, {
160
160
  logLevel: LogLevel.Trace,
161
161
  containsPii: false,
162
- correlationId: correlationId || ""
162
+ correlationId: correlationId || Constants.EMPTY_STRING
163
163
  });
164
164
  };
165
165
  /**
@@ -169,7 +169,7 @@ var Logger = /** @class */ (function () {
169
169
  this.logMessage(message, {
170
170
  logLevel: LogLevel.Trace,
171
171
  containsPii: true,
172
- correlationId: correlationId || ""
172
+ correlationId: correlationId || Constants.EMPTY_STRING
173
173
  });
174
174
  };
175
175
  /**
@@ -1 +1 @@
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 {\n return this.piiLoggingEnabled || false;\n }\n}\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,aAA4B,EAAE,WAAoB,EAAE,cAAuB;;QAd/E,UAAK,GAAa,QAAQ,CAAC,IAAI,CAAC;QAepC,IAAM,qBAAqB,GAAG;YAC1B,OAAO;SACV,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,cAAc,IAAI,qBAAqB,CAAC;QAC3E,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,iBAAiB,IAAI,KAAK,CAAC;QAClE,IAAI,CAAC,KAAK,GAAG,QAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;QAClG,IAAI,CAAC,aAA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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 || Constants.EMPTY_STRING;\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\": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\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 || Constants.EMPTY_STRING\n });\n }\n\n /**\n * Returns whether PII Logging is enabled or not.\n */\n isPiiLoggingEnabled(): boolean {\n return this.piiLoggingEnabled || false;\n }\n}\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,aAA4B,EAAE,WAAoB,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AC1B,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;SACzD,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,SAAS,CAAC,YAAY;SACzD,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,SAAS,CAAC,YAAY;SACzD,CAAC,CAAC;KACN;;;;IAKD,oCAAmB,GAAnB;QACI,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;KAC1C;IACL,aAAC;AAAD,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { AuthError } from '../error/AuthError.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { ThrottlingUtils } from './ThrottlingUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { ThrottlingConstants, CacheSchemaType, Constants, HeaderNames } from '../utils/Constants.js';
4
4
  import { ServerError } from '../error/ServerError.js';
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-common";
2
- export declare const version = "6.1.0";
2
+ export declare const version = "6.3.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  /* eslint-disable header/header */
4
4
  var name = "@azure/msal-common";
5
- var version = "6.1.0";
5
+ var version = "6.3.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 */\nexport const name = \"@azure/msal-common\";\nexport const version = \"6.1.0\";\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.3.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,qBAAqB;IAC5B,OAAO,GAAG;;;;"}
@@ -1,7 +1,7 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
4
- import { HeaderNames } from '../utils/Constants.js';
4
+ import { HeaderNames, Constants } from '../utils/Constants.js';
5
5
 
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -53,7 +53,7 @@ var AuthenticationHeaderParser = /** @class */ (function () {
53
53
  challenges.forEach(function (challenge) {
54
54
  var _a = challenge.split("="), key = _a[0], value = _a[1];
55
55
  // Remove escaped quotation marks (', ") from challenge string to keep only the challenge value
56
- challengeMap[key] = unescape(value.replace(/['"]+/g, ""));
56
+ challengeMap[key] = unescape(value.replace(/['"]+/g, Constants.EMPTY_STRING));
57
57
  });
58
58
  return challengeMap;
59
59
  };
@@ -1 +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;;;;AAgBA;;;;;IAOI,oCAAY,OAA+B;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;;;;;IAMD,gDAAW,GAAX;;QAEI,IAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QACxE,IAAI,kBAAkB,EAAE;YACpB,IAAM,4BAA4B,GAAG,IAAI,CAAC,eAAe,CAA+B,kBAAkB,CAAC,CAAC;YAC5G,IAAI,4BAA4B,CAAC,SAAS,EAAE;gBACxC,OAAO,4BAA4B,CAAC,SAAS,CAAC;aACjD;YACD,MAAM,wBAAwB,CAAC,sCAAsC,CAAC,WAAW,CAAC,kBAAkB,EAAE,iCAAiC,CAAC,CAAC;SAC5I;;QAGD,IAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAClE,IAAI,eAAe,EAAE;YACjB,IAAM,yBAAyB,GAAG,IAAI,CAAC,eAAe,CAA4B,eAAe,CAAC,CAAC;YACnG,IAAI,yBAAyB,CAAC,KAAK,EAAC;gBAChC,OAAO,yBAAyB,CAAC,KAAK,CAAC;aAC1C;YACD,MAAM,wBAAwB,CAAC,sCAAsC,CAAC,WAAW,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;SACrI;;QAGD,MAAM,wBAAwB,CAAC,4CAA4C,EAAE,CAAC;KACjF;;;;;;IAOO,oDAAe,GAAvB,UAA2B,MAAc;QACrC,IAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjE,IAAM,YAAY,GAAG,EAAO,CAAC;QAE7B,UAAU,CAAC,OAAO,CAAC,UAAC,SAAiB;YAC3B,IAAA,KAAiB,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnC,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
+ {"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 { Constants, 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, Constants.EMPTY_STRING));\n });\n\n return challengeMap;\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAgBA;;;;;IAOI,oCAAY,OAA+B;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;;;;;IAMD,gDAAW,GAAX;;QAEI,IAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QACxE,IAAI,kBAAkB,EAAE;YACpB,IAAM,4BAA4B,GAAG,IAAI,CAAC,eAAe,CAA+B,kBAAkB,CAAC,CAAC;YAC5G,IAAI,4BAA4B,CAAC,SAAS,EAAE;gBACxC,OAAO,4BAA4B,CAAC,SAAS,CAAC;aACjD;YACD,MAAM,wBAAwB,CAAC,sCAAsC,CAAC,WAAW,CAAC,kBAAkB,EAAE,iCAAiC,CAAC,CAAC;SAC5I;;QAGD,IAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAClE,IAAI,eAAe,EAAE;YACjB,IAAM,yBAAyB,GAAG,IAAI,CAAC,eAAe,CAA4B,eAAe,CAAC,CAAC;YACnG,IAAI,yBAAyB,CAAC,KAAK,EAAC;gBAChC,OAAO,yBAAyB,CAAC,KAAK,CAAC;aAC1C;YACD,MAAM,wBAAwB,CAAC,sCAAsC,CAAC,WAAW,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;SACrI;;QAGD,MAAM,wBAAwB,CAAC,4CAA4C,EAAE,CAAC;KACjF;;;;;;IAOO,oDAAe,GAAvB,UAA2B,MAAc;QACrC,IAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjE,IAAM,YAAY,GAAG,EAAO,CAAC;QAE7B,UAAU,CAAC,OAAO,CAAC,UAAC,SAAiB;YAC3B,IAAA,KAAiB,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnC,GAAG,QAAA,EAAE,KAAK,QAAyB,CAAC;;YAE5C,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;SACjF,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;KACvB;IACL,iCAAC;AAAD,CAAC;;;;"}
@@ -46,5 +46,6 @@ export declare type CommonAuthorizationUrlRequest = BaseAuthRequest & {
46
46
  prompt?: string;
47
47
  sid?: string;
48
48
  state?: string;
49
+ nativeBroker?: boolean;
49
50
  };
50
51
  //# sourceMappingURL=CommonAuthorizationUrlRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,oBAAY,6BAA6B,GAAG,eAAe,GAAG;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"CommonAuthorizationUrlRequest.d.ts","sourceRoot":"","sources":["../../src/request/CommonAuthorizationUrlRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,oBAAY,6BAA6B,GAAG,eAAe,GAAG;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { ResponseMode } from "../utils/Constants";
2
2
  import { StringDict } from "../utils/MsalTypes";
3
- import { LibraryInfo } from "../config/ClientConfiguration";
3
+ import { ApplicationTelemetry, LibraryInfo } from "../config/ClientConfiguration";
4
4
  import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager";
5
5
  import { ClientInfo } from "../account/ClientInfo";
6
6
  export declare class RequestParameterBuilder {
@@ -10,11 +10,19 @@ export declare class RequestParameterBuilder {
10
10
  * add response_type = code
11
11
  */
12
12
  addResponseTypeCode(): void;
13
+ /**
14
+ * add response_type = token id_token
15
+ */
16
+ addResponseTypeForTokenAndIdToken(): void;
13
17
  /**
14
18
  * add response_mode. defaults to query.
15
19
  * @param responseMode
16
20
  */
17
21
  addResponseMode(responseMode?: ResponseMode): void;
22
+ /**
23
+ * Add flag to indicate STS should attempt to use WAM if available
24
+ */
25
+ addNativeBroker(): void;
18
26
  /**
19
27
  * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios
20
28
  * @param scopeSet
@@ -81,6 +89,11 @@ export declare class RequestParameterBuilder {
81
89
  * @param libraryInfo
82
90
  */
83
91
  addLibraryInfo(libraryInfo: LibraryInfo): void;
92
+ /**
93
+ * Add client telemetry parameters
94
+ * @param appTelemetry
95
+ */
96
+ addApplicationTelemetry(appTelemetry: ApplicationTelemetry): void;
84
97
  /**
85
98
  * add prompt
86
99
  * @param prompt
@@ -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,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,MA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C,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC;;;OAGG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAOpC;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAOrC;;;OAGG;IACH,kBAAkB,CAAC,sBAAsB,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 v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
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';
@@ -21,6 +21,12 @@ var RequestParameterBuilder = /** @class */ (function () {
21
21
  RequestParameterBuilder.prototype.addResponseTypeCode = function () {
22
22
  this.parameters.set(AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE));
23
23
  };
24
+ /**
25
+ * add response_type = token id_token
26
+ */
27
+ RequestParameterBuilder.prototype.addResponseTypeForTokenAndIdToken = function () {
28
+ this.parameters.set(AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.TOKEN_RESPONSE_TYPE + " " + Constants.ID_TOKEN_RESPONSE_TYPE));
29
+ };
24
30
  /**
25
31
  * add response_mode. defaults to query.
26
32
  * @param responseMode
@@ -28,6 +34,12 @@ var RequestParameterBuilder = /** @class */ (function () {
28
34
  RequestParameterBuilder.prototype.addResponseMode = function (responseMode) {
29
35
  this.parameters.set(AADServerParamKeys.RESPONSE_MODE, encodeURIComponent((responseMode) ? responseMode : ResponseMode.QUERY));
30
36
  };
37
+ /**
38
+ * Add flag to indicate STS should attempt to use WAM if available
39
+ */
40
+ RequestParameterBuilder.prototype.addNativeBroker = function () {
41
+ this.parameters.set(AADServerParamKeys.NATIVE_BROKER, encodeURIComponent("1"));
42
+ };
31
43
  /**
32
44
  * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios
33
45
  * @param scopeSet
@@ -128,8 +140,24 @@ var RequestParameterBuilder = /** @class */ (function () {
128
140
  // Telemetry Info
129
141
  this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku);
130
142
  this.parameters.set(AADServerParamKeys.X_CLIENT_VER, libraryInfo.version);
131
- this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);
132
- this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);
143
+ if (libraryInfo.os) {
144
+ this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);
145
+ }
146
+ if (libraryInfo.cpu) {
147
+ this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);
148
+ }
149
+ };
150
+ /**
151
+ * Add client telemetry parameters
152
+ * @param appTelemetry
153
+ */
154
+ RequestParameterBuilder.prototype.addApplicationTelemetry = function (appTelemetry) {
155
+ if (appTelemetry === null || appTelemetry === void 0 ? void 0 : appTelemetry.appName) {
156
+ this.parameters.set(AADServerParamKeys.X_APP_NAME, appTelemetry.appName);
157
+ }
158
+ if (appTelemetry === null || appTelemetry === void 0 ? void 0 : appTelemetry.appVersion) {
159
+ this.parameters.set(AADServerParamKeys.X_APP_VER, appTelemetry.appVersion);
160
+ }
133
161
  };
134
162
  /**
135
163
  * add prompt
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParameterBuilder.js","sources":["../../src/request/RequestParameterBuilder.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AADServerParamKeys, Constants, ResponseMode, SSOTypes, CLIENT_INFO, AuthenticationScheme, ClaimsRequestKeys, PasswordGrantConstants, OIDC_DEFAULT_SCOPES, ThrottlingConstants, HeaderNames} from \"../utils/Constants\";\nimport { ScopeSet } from \"./ScopeSet\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { StringDict } from \"../utils/MsalTypes\";\nimport { RequestValidator } from \"./RequestValidator\";\nimport { LibraryInfo } from \"../config/ClientConfiguration\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ClientInfo } from \"../account/ClientInfo\";\n\nexport class RequestParameterBuilder {\n\n private parameters: Map<string, string>;\n\n constructor() {\n this.parameters = new Map<string, string>();\n }\n\n /**\n * add response_type = code\n */\n addResponseTypeCode(): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE)\n );\n }\n\n /**\n * add response_mode. defaults to query.\n * @param responseMode\n */\n addResponseMode(responseMode?: ResponseMode): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_MODE,\n encodeURIComponent((responseMode) ? responseMode : ResponseMode.QUERY)\n );\n }\n\n /**\n * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios\n * @param scopeSet\n * @param addOidcScopes\n */\n addScopes(scopes: string[], addOidcScopes: boolean = true): void {\n const requestScopes = addOidcScopes ? [...scopes || [], ...OIDC_DEFAULT_SCOPES] : scopes || [];\n const scopeSet = new ScopeSet(requestScopes);\n this.parameters.set(AADServerParamKeys.SCOPE, encodeURIComponent(scopeSet.printScopes()));\n }\n\n /**\n * add clientId\n * @param clientId\n */\n addClientId(clientId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ID, encodeURIComponent(clientId));\n }\n\n /**\n * add redirect_uri\n * @param redirectUri\n */\n addRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.REDIRECT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add post logout redirectUri\n * @param redirectUri\n */\n addPostLogoutRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.POST_LOGOUT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add id_token_hint to logout request\n * @param idTokenHint\n */\n addIdTokenHint(idTokenHint: string): void {\n this.parameters.set(AADServerParamKeys.ID_TOKEN_HINT, encodeURIComponent(idTokenHint));\n }\n\n /**\n * add domain_hint\n * @param domainHint\n */\n addDomainHint(domainHint: string): void {\n this.parameters.set(SSOTypes.DOMAIN_HINT, encodeURIComponent(domainHint));\n }\n\n /**\n * add login_hint\n * @param loginHint\n */\n addLoginHint(loginHint: string): void {\n this.parameters.set(SSOTypes.LOGIN_HINT, encodeURIComponent(loginHint));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for login_hint\n * @param loginHint \n */\n addCcsUpn(loginHint: string): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for account object\n * @param loginHint \n */\n addCcsOid(clientInfo: ClientInfo): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`));\n }\n\n /**\n * add sid\n * @param sid\n */\n addSid(sid: string): void {\n this.parameters.set(SSOTypes.SID, encodeURIComponent(sid));\n }\n\n /**\n * add claims\n * @param claims\n */\n addClaims(claims?: string, clientCapabilities?: Array<string>): void {\n const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities);\n RequestValidator.validateClaims(mergedClaims);\n this.parameters.set(AADServerParamKeys.CLAIMS, encodeURIComponent(mergedClaims));\n }\n\n /**\n * add correlationId\n * @param correlationId\n */\n addCorrelationId(correlationId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_REQUEST_ID, encodeURIComponent(correlationId));\n }\n\n /**\n * add library info query params\n * @param libraryInfo\n */\n addLibraryInfo(libraryInfo: LibraryInfo): void {\n // Telemetry Info\n this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku);\n this.parameters.set(AADServerParamKeys.X_CLIENT_VER, libraryInfo.version);\n this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);\n this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);\n }\n\n /**\n * add prompt\n * @param prompt\n */\n addPrompt(prompt: string): void {\n RequestValidator.validatePrompt(prompt);\n this.parameters.set(`${AADServerParamKeys.PROMPT}`, encodeURIComponent(prompt));\n }\n\n /**\n * add state\n * @param state\n */\n addState(state: string): void {\n if (!StringUtils.isEmpty(state)) {\n this.parameters.set(AADServerParamKeys.STATE, encodeURIComponent(state));\n }\n }\n\n /**\n * add nonce\n * @param nonce\n */\n addNonce(nonce: string): void {\n this.parameters.set(AADServerParamKeys.NONCE, encodeURIComponent(nonce));\n }\n\n /**\n * add code_challenge and code_challenge_method\n * - throw if either of them are not passed\n * @param codeChallenge\n * @param codeChallengeMethod\n */\n addCodeChallengeParams(\n codeChallenge: string,\n codeChallengeMethod: string\n ): void {\n RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod);\n if (codeChallenge && codeChallengeMethod) {\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE, encodeURIComponent(codeChallenge));\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod));\n } else {\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\n }\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addAuthorizationCode(code: string): void {\n this.parameters.set(AADServerParamKeys.CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addDeviceCode(code: string): void {\n this.parameters.set(AADServerParamKeys.DEVICE_CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `refreshToken` passed by the user\n * @param refreshToken\n */\n addRefreshToken(refreshToken: string): void {\n this.parameters.set(AADServerParamKeys.REFRESH_TOKEN, encodeURIComponent(refreshToken));\n }\n\n /**\n * add the `code_verifier` passed by the user to exchange for a token\n * @param codeVerifier\n */\n addCodeVerifier(codeVerifier: string): void {\n this.parameters.set(AADServerParamKeys.CODE_VERIFIER, encodeURIComponent(codeVerifier));\n }\n\n /**\n * add client_secret\n * @param clientSecret\n */\n addClientSecret(clientSecret: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_SECRET, encodeURIComponent(clientSecret));\n }\n\n /**\n * add clientAssertion for confidential client flows\n * @param clientAssertion\n */\n addClientAssertion(clientAssertion: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\n }\n\n /**\n * add clientAssertionType for confidential client flows\n * @param clientAssertionType\n */\n addClientAssertionType(clientAssertionType: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\n }\n\n /**\n * add OBO assertion for confidential client flows\n * @param clientAssertion\n */\n addOboAssertion(oboAssertion: string): void {\n this.parameters.set(AADServerParamKeys.OBO_ASSERTION, encodeURIComponent(oboAssertion));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addRequestTokenUse(tokenUse: string): void {\n this.parameters.set(AADServerParamKeys.REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addGrantType(grantType: string): void {\n this.parameters.set(AADServerParamKeys.GRANT_TYPE, encodeURIComponent(grantType));\n }\n\n /**\n * add client info\n *\n */\n addClientInfo(): void {\n this.parameters.set(CLIENT_INFO, \"1\");\n }\n\n /**\n * add extraQueryParams\n * @param eQparams\n */\n addExtraQueryParameters(eQparams: StringDict): void {\n RequestValidator.sanitizeEQParams(eQparams, this.parameters);\n Object.keys(eQparams).forEach((key) => {\n this.parameters.set(key, eQparams[key]);\n });\n }\n\n addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array<string>): string {\n let mergedClaims: object;\n\n // Parse provided claims into JSON object or initialize empty object\n if (!claims) {\n mergedClaims = {};\n } else {\n try {\n mergedClaims = JSON.parse(claims);\n } catch(e) {\n throw ClientConfigurationError.createInvalidClaimsRequestError();\n }\n }\n\n if (clientCapabilities && clientCapabilities.length > 0) {\n if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)){\n // Add access_token key to claims object\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {};\n }\n\n // Add xms_cc claim with provided clientCapabilities to access_token key\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = {\n values: clientCapabilities\n };\n }\n\n return JSON.stringify(mergedClaims);\n }\n\n /**\n * adds `username` for Password Grant flow\n * @param username\n */\n addUsername(username: string): void {\n this.parameters.set(PasswordGrantConstants.username, username);\n }\n\n /**\n * adds `password` for Password Grant flow\n * @param password\n */\n addPassword(password: string): void {\n this.parameters.set(PasswordGrantConstants.password, password);\n }\n\n /**\n * add pop_jwk to query params\n * @param cnfString\n */\n addPopToken(cnfString: string): void {\n if (!StringUtils.isEmpty(cnfString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.POP);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));\n }\n }\n\n /**\n * add SSH JWK and key ID to query params \n */\n addSshJwk(sshJwkString: string): void {\n if(!StringUtils.isEmpty(sshJwkString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.SSH);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));\n }\n }\n\n /**\n * add server telemetry fields\n * @param serverTelemetryManager \n */\n addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void {\n this.parameters.set(AADServerParamKeys.X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue());\n this.parameters.set(AADServerParamKeys.X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue());\n }\n\n /**\n * Adds parameter that indicates to the server that throttling is supported\n */\n addThrottling(): void {\n this.parameters.set(AADServerParamKeys.X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);\n }\n\n /**\n * Adds logout_hint parameter for \"silent\" logout which prevent server account picker\n */\n addLogoutHint(logoutHint: string): void {\n this.parameters.set(AADServerParamKeys.LOGOUT_HINT, encodeURIComponent(logoutHint));\n }\n\n /**\n * Utility to create a URL from the params map\n */\n createQueryString(): string {\n const queryParameterArray: Array<string> = new Array<string>();\n\n this.parameters.forEach((value, key) => {\n queryParameterArray.push(`${key}=${value}`);\n });\n\n return queryParameterArray.join(\"&\");\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;IAmBI;QACI,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;KAC/C;;;;IAKD,qDAAmB,GAAnB;QACI,IAAI,CAAC,UAAU,CAAC,GAAG,CACf,kBAAkB,CAAC,aAAa,EAAE,kBAAkB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CACrF,CAAC;KACL;;;;;IAMD,iDAAe,GAAf,UAAgB,YAA2B;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CACf,kBAAkB,CAAC,aAAa,EAChC,kBAAkB,CAAC,CAAC,YAAY,IAAI,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CACzE,CAAC;KACL;;;;;;IAOD,2CAAS,GAAT,UAAU,MAAgB,EAAE,aAA6B;QAA7B,8BAAA,EAAA,oBAA6B;QACrD,IAAM,aAAa,GAAG,aAAa,kBAAO,MAAM,IAAI,EAAE,EAAK,mBAAmB,IAAI,MAAM,IAAI,EAAE,CAAC;QAC/F,IAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,CAA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,CAAC;KACxH;;;;IAKD,+CAAa,GAAb;QACI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;KAC9G;;;;IAKD,+CAAa,GAAb,UAAc,UAAkB;QAC5B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;KACvF;;;;IAKD,mDAAiB,GAAjB;QACI,IAAM,mBAAmB,GAAkB,IAAI,KAAK,EAAU,CAAC;QAE/D,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;YAC/B,mBAAmB,CAAC,IAAI,CAAI,GAAG,SAAI,KAAO,CAAC,CAAC;SAC/C,CAAC,CAAC;QAEH,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACxC;IACL,8BAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"RequestParameterBuilder.js","sources":["../../src/request/RequestParameterBuilder.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AADServerParamKeys, Constants, ResponseMode, SSOTypes, CLIENT_INFO, AuthenticationScheme, ClaimsRequestKeys, PasswordGrantConstants, OIDC_DEFAULT_SCOPES, ThrottlingConstants, HeaderNames} from \"../utils/Constants\";\nimport { ScopeSet } from \"./ScopeSet\";\nimport { ClientConfigurationError } from \"../error/ClientConfigurationError\";\nimport { StringDict } from \"../utils/MsalTypes\";\nimport { RequestValidator } from \"./RequestValidator\";\nimport { ApplicationTelemetry, LibraryInfo } from \"../config/ClientConfiguration\";\nimport { StringUtils } from \"../utils/StringUtils\";\nimport { ServerTelemetryManager } from \"../telemetry/server/ServerTelemetryManager\";\nimport { ClientInfo } from \"../account/ClientInfo\";\n\nexport class RequestParameterBuilder {\n\n private parameters: Map<string, string>;\n\n constructor() {\n this.parameters = new Map<string, string>();\n }\n\n /**\n * add response_type = code\n */\n addResponseTypeCode(): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(Constants.CODE_RESPONSE_TYPE)\n );\n }\n\n /**\n * add response_type = token id_token\n */\n addResponseTypeForTokenAndIdToken(): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_TYPE, encodeURIComponent(`${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}`)\n );\n }\n\n /**\n * add response_mode. defaults to query.\n * @param responseMode\n */\n addResponseMode(responseMode?: ResponseMode): void {\n this.parameters.set(\n AADServerParamKeys.RESPONSE_MODE,\n encodeURIComponent((responseMode) ? responseMode : ResponseMode.QUERY)\n );\n }\n\n /**\n * Add flag to indicate STS should attempt to use WAM if available\n */\n addNativeBroker(): void {\n this.parameters.set(\n AADServerParamKeys.NATIVE_BROKER,\n encodeURIComponent(\"1\")\n );\n }\n\n /**\n * add scopes. set addOidcScopes to false to prevent default scopes in non-user scenarios\n * @param scopeSet\n * @param addOidcScopes\n */\n addScopes(scopes: string[], addOidcScopes: boolean = true): void {\n const requestScopes = addOidcScopes ? [...scopes || [], ...OIDC_DEFAULT_SCOPES] : scopes || [];\n const scopeSet = new ScopeSet(requestScopes);\n this.parameters.set(AADServerParamKeys.SCOPE, encodeURIComponent(scopeSet.printScopes()));\n }\n\n /**\n * add clientId\n * @param clientId\n */\n addClientId(clientId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ID, encodeURIComponent(clientId));\n }\n\n /**\n * add redirect_uri\n * @param redirectUri\n */\n addRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.REDIRECT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add post logout redirectUri\n * @param redirectUri\n */\n addPostLogoutRedirectUri(redirectUri: string): void {\n RequestValidator.validateRedirectUri(redirectUri);\n this.parameters.set(AADServerParamKeys.POST_LOGOUT_URI, encodeURIComponent(redirectUri));\n }\n\n /**\n * add id_token_hint to logout request\n * @param idTokenHint\n */\n addIdTokenHint(idTokenHint: string): void {\n this.parameters.set(AADServerParamKeys.ID_TOKEN_HINT, encodeURIComponent(idTokenHint));\n }\n\n /**\n * add domain_hint\n * @param domainHint\n */\n addDomainHint(domainHint: string): void {\n this.parameters.set(SSOTypes.DOMAIN_HINT, encodeURIComponent(domainHint));\n }\n\n /**\n * add login_hint\n * @param loginHint\n */\n addLoginHint(loginHint: string): void {\n this.parameters.set(SSOTypes.LOGIN_HINT, encodeURIComponent(loginHint));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for login_hint\n * @param loginHint\n */\n addCcsUpn(loginHint: string): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`UPN:${loginHint}`));\n }\n\n /**\n * Adds the CCS (Cache Credential Service) query parameter for account object\n * @param loginHint\n */\n addCcsOid(clientInfo: ClientInfo): void {\n this.parameters.set(HeaderNames.CCS_HEADER, encodeURIComponent(`Oid:${clientInfo.uid}@${clientInfo.utid}`));\n }\n\n /**\n * add sid\n * @param sid\n */\n addSid(sid: string): void {\n this.parameters.set(SSOTypes.SID, encodeURIComponent(sid));\n }\n\n /**\n * add claims\n * @param claims\n */\n addClaims(claims?: string, clientCapabilities?: Array<string>): void {\n const mergedClaims = this.addClientCapabilitiesToClaims(claims, clientCapabilities);\n RequestValidator.validateClaims(mergedClaims);\n this.parameters.set(AADServerParamKeys.CLAIMS, encodeURIComponent(mergedClaims));\n }\n\n /**\n * add correlationId\n * @param correlationId\n */\n addCorrelationId(correlationId: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_REQUEST_ID, encodeURIComponent(correlationId));\n }\n\n /**\n * add library info query params\n * @param libraryInfo\n */\n addLibraryInfo(libraryInfo: LibraryInfo): void {\n // Telemetry Info\n this.parameters.set(AADServerParamKeys.X_CLIENT_SKU, libraryInfo.sku);\n this.parameters.set(AADServerParamKeys.X_CLIENT_VER, libraryInfo.version);\n if (libraryInfo.os) {\n this.parameters.set(AADServerParamKeys.X_CLIENT_OS, libraryInfo.os);\n }\n if (libraryInfo.cpu) {\n this.parameters.set(AADServerParamKeys.X_CLIENT_CPU, libraryInfo.cpu);\n }\n }\n\n /**\n * Add client telemetry parameters\n * @param appTelemetry\n */\n addApplicationTelemetry(appTelemetry: ApplicationTelemetry): void {\n if (appTelemetry?.appName) {\n this.parameters.set(AADServerParamKeys.X_APP_NAME, appTelemetry.appName);\n }\n\n if (appTelemetry?.appVersion) {\n this.parameters.set(AADServerParamKeys.X_APP_VER, appTelemetry.appVersion);\n }\n }\n\n /**\n * add prompt\n * @param prompt\n */\n addPrompt(prompt: string): void {\n RequestValidator.validatePrompt(prompt);\n this.parameters.set(`${AADServerParamKeys.PROMPT}`, encodeURIComponent(prompt));\n }\n\n /**\n * add state\n * @param state\n */\n addState(state: string): void {\n if (!StringUtils.isEmpty(state)) {\n this.parameters.set(AADServerParamKeys.STATE, encodeURIComponent(state));\n }\n }\n\n /**\n * add nonce\n * @param nonce\n */\n addNonce(nonce: string): void {\n this.parameters.set(AADServerParamKeys.NONCE, encodeURIComponent(nonce));\n }\n\n /**\n * add code_challenge and code_challenge_method\n * - throw if either of them are not passed\n * @param codeChallenge\n * @param codeChallengeMethod\n */\n addCodeChallengeParams(\n codeChallenge: string,\n codeChallengeMethod: string\n ): void {\n RequestValidator.validateCodeChallengeParams(codeChallenge, codeChallengeMethod);\n if (codeChallenge && codeChallengeMethod) {\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE, encodeURIComponent(codeChallenge));\n this.parameters.set(AADServerParamKeys.CODE_CHALLENGE_METHOD, encodeURIComponent(codeChallengeMethod));\n } else {\n throw ClientConfigurationError.createInvalidCodeChallengeParamsError();\n }\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addAuthorizationCode(code: string): void {\n this.parameters.set(AADServerParamKeys.CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `authorization_code` passed by the user to exchange for a token\n * @param code\n */\n addDeviceCode(code: string): void {\n this.parameters.set(AADServerParamKeys.DEVICE_CODE, encodeURIComponent(code));\n }\n\n /**\n * add the `refreshToken` passed by the user\n * @param refreshToken\n */\n addRefreshToken(refreshToken: string): void {\n this.parameters.set(AADServerParamKeys.REFRESH_TOKEN, encodeURIComponent(refreshToken));\n }\n\n /**\n * add the `code_verifier` passed by the user to exchange for a token\n * @param codeVerifier\n */\n addCodeVerifier(codeVerifier: string): void {\n this.parameters.set(AADServerParamKeys.CODE_VERIFIER, encodeURIComponent(codeVerifier));\n }\n\n /**\n * add client_secret\n * @param clientSecret\n */\n addClientSecret(clientSecret: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_SECRET, encodeURIComponent(clientSecret));\n }\n\n /**\n * add clientAssertion for confidential client flows\n * @param clientAssertion\n */\n addClientAssertion(clientAssertion: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));\n }\n\n /**\n * add clientAssertionType for confidential client flows\n * @param clientAssertionType\n */\n addClientAssertionType(clientAssertionType: string): void {\n this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));\n }\n\n /**\n * add OBO assertion for confidential client flows\n * @param clientAssertion\n */\n addOboAssertion(oboAssertion: string): void {\n this.parameters.set(AADServerParamKeys.OBO_ASSERTION, encodeURIComponent(oboAssertion));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addRequestTokenUse(tokenUse: string): void {\n this.parameters.set(AADServerParamKeys.REQUESTED_TOKEN_USE, encodeURIComponent(tokenUse));\n }\n\n /**\n * add grant type\n * @param grantType\n */\n addGrantType(grantType: string): void {\n this.parameters.set(AADServerParamKeys.GRANT_TYPE, encodeURIComponent(grantType));\n }\n\n /**\n * add client info\n *\n */\n addClientInfo(): void {\n this.parameters.set(CLIENT_INFO, \"1\");\n }\n\n /**\n * add extraQueryParams\n * @param eQparams\n */\n addExtraQueryParameters(eQparams: StringDict): void {\n RequestValidator.sanitizeEQParams(eQparams, this.parameters);\n Object.keys(eQparams).forEach((key) => {\n this.parameters.set(key, eQparams[key]);\n });\n }\n\n addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array<string>): string {\n let mergedClaims: object;\n\n // Parse provided claims into JSON object or initialize empty object\n if (!claims) {\n mergedClaims = {};\n } else {\n try {\n mergedClaims = JSON.parse(claims);\n } catch(e) {\n throw ClientConfigurationError.createInvalidClaimsRequestError();\n }\n }\n\n if (clientCapabilities && clientCapabilities.length > 0) {\n if (!mergedClaims.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)){\n // Add access_token key to claims object\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN] = {};\n }\n\n // Add xms_cc claim with provided clientCapabilities to access_token key\n mergedClaims[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC] = {\n values: clientCapabilities\n };\n }\n\n return JSON.stringify(mergedClaims);\n }\n\n /**\n * adds `username` for Password Grant flow\n * @param username\n */\n addUsername(username: string): void {\n this.parameters.set(PasswordGrantConstants.username, username);\n }\n\n /**\n * adds `password` for Password Grant flow\n * @param password\n */\n addPassword(password: string): void {\n this.parameters.set(PasswordGrantConstants.password, password);\n }\n\n /**\n * add pop_jwk to query params\n * @param cnfString\n */\n addPopToken(cnfString: string): void {\n if (!StringUtils.isEmpty(cnfString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.POP);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(cnfString));\n }\n }\n\n /**\n * add SSH JWK and key ID to query params\n */\n addSshJwk(sshJwkString: string): void {\n if(!StringUtils.isEmpty(sshJwkString)) {\n this.parameters.set(AADServerParamKeys.TOKEN_TYPE, AuthenticationScheme.SSH);\n this.parameters.set(AADServerParamKeys.REQ_CNF, encodeURIComponent(sshJwkString));\n }\n }\n\n /**\n * add server telemetry fields\n * @param serverTelemetryManager\n */\n addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void {\n this.parameters.set(AADServerParamKeys.X_CLIENT_CURR_TELEM, serverTelemetryManager.generateCurrentRequestHeaderValue());\n this.parameters.set(AADServerParamKeys.X_CLIENT_LAST_TELEM, serverTelemetryManager.generateLastRequestHeaderValue());\n }\n\n /**\n * Adds parameter that indicates to the server that throttling is supported\n */\n addThrottling(): void {\n this.parameters.set(AADServerParamKeys.X_MS_LIB_CAPABILITY, ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE);\n }\n\n /**\n * Adds logout_hint parameter for \"silent\" logout which prevent server account picker\n */\n addLogoutHint(logoutHint: string): void {\n this.parameters.set(AADServerParamKeys.LOGOUT_HINT, encodeURIComponent(logoutHint));\n }\n\n /**\n * Utility to create a URL from the params map\n */\n createQueryString(): string {\n const queryParameterArray: Array<string> = new Array<string>();\n\n this.parameters.forEach((value, key) => {\n queryParameterArray.push(`${key}=${value}`);\n });\n\n return queryParameterArray.join(\"&\");\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;IAmBI;QACI,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;KAC/C;;;;IAKD,qDAAmB,GAAnB;QACI,IAAI,CAAC,UAAU,CAAC,GAAG,CACf,kBAAkB,CAAC,aAAa,EAAE,kBAAkB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CACrF,CAAC;KACL;;;;IAKD,mEAAiC,GAAjC;QACI,IAAI,CAAC,UAAU,CAAC,GAAG,CACf,kBAAkB,CAAC,aAAa,EAAE,kBAAkB,CAAI,SAAS,CAAC,mBAAmB,SAAI,SAAS,CAAC,sBAAwB,CAAC,CAC/H,CAAC;KACL;;;;;IAMD,iDAAe,GAAf,UAAgB,YAA2B;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CACf,kBAAkB,CAAC,aAAa,EAChC,kBAAkB,CAAC,CAAC,YAAY,IAAI,YAAY,GAAG,YAAY,CAAC,KAAK,CAA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AAmB,GAAkB,IAAI,KAAK,EAAU,CAAC;QAE/D,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;YAC/B,mBAAmB,CAAC,IAAI,CAAI,GAAG,SAAI,KAAO,CAAC,CAAC;SAC/C,CAAC,CAAC;QAEH,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACxC;IACL,8BAAC;AAAD,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { StringUtils } from '../utils/StringUtils.js';
4
4
  import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
@@ -1,10 +1,10 @@
1
- /*! @azure/msal-common v6.1.0 2022-02-08 */
1
+ /*! @azure/msal-common v6.3.0 2022-05-02 */
2
2
  'use strict';
3
3
  import { __spreadArrays } from '../_virtual/_tslib.js';
4
4
  import { ClientConfigurationError } from '../error/ClientConfigurationError.js';
5
5
  import { StringUtils } from '../utils/StringUtils.js';
6
6
  import { ClientAuthError } from '../error/ClientAuthError.js';
7
- import { OIDC_SCOPES } from '../utils/Constants.js';
7
+ import { OIDC_SCOPES, Constants } from '../utils/Constants.js';
8
8
 
9
9
  /*
10
10
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -33,7 +33,7 @@ var ScopeSet = /** @class */ (function () {
33
33
  * @param scopesRequired
34
34
  */
35
35
  ScopeSet.fromString = function (inputScopeString) {
36
- var scopeString = inputScopeString || "";
36
+ var scopeString = inputScopeString || Constants.EMPTY_STRING;
37
37
  var inputScopes = scopeString.split(" ");
38
38
  return new ScopeSet(inputScopes);
39
39
  };
@@ -177,7 +177,7 @@ var ScopeSet = /** @class */ (function () {
177
177
  var scopeArr = this.asArray();
178
178
  return scopeArr.join(" ");
179
179
  }
180
- return "";
180
+ return Constants.EMPTY_STRING;
181
181
  };
182
182
  /**
183
183
  * Prints scopes into a space-delimited lower-case string (used for caching)