@azure/msal-browser 3.20.0 → 3.21.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 (208) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +53 -53
  2. package/dist/app/IPublicClientApplication.mjs +105 -105
  3. package/dist/app/PublicClientApplication.d.ts +293 -293
  4. package/dist/app/PublicClientApplication.mjs +364 -364
  5. package/dist/app/PublicClientNext.d.ts +276 -276
  6. package/dist/app/PublicClientNext.mjs +354 -354
  7. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +62 -62
  8. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +254 -254
  9. package/dist/broker/nativeBroker/NativeRequest.d.ts +45 -45
  10. package/dist/broker/nativeBroker/NativeResponse.d.ts +48 -48
  11. package/dist/broker/nativeBroker/NativeStatusCodes.d.ts +7 -7
  12. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +11 -11
  13. package/dist/cache/AccountManager.d.ts +48 -48
  14. package/dist/cache/AccountManager.mjs +126 -126
  15. package/dist/cache/AsyncMemoryStorage.d.ts +50 -50
  16. package/dist/cache/AsyncMemoryStorage.mjs +131 -131
  17. package/dist/cache/BrowserCacheManager.d.ts +410 -385
  18. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  19. package/dist/cache/BrowserCacheManager.mjs +1364 -1294
  20. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  21. package/dist/cache/BrowserStorage.d.ts +11 -11
  22. package/dist/cache/BrowserStorage.mjs +32 -32
  23. package/dist/cache/DatabaseStorage.d.ts +56 -56
  24. package/dist/cache/DatabaseStorage.mjs +200 -200
  25. package/dist/cache/IAsyncStorage.d.ts +27 -27
  26. package/dist/cache/ITokenCache.d.ts +11 -11
  27. package/dist/cache/IWindowStorage.d.ts +27 -27
  28. package/dist/cache/MemoryStorage.d.ts +11 -11
  29. package/dist/cache/MemoryStorage.mjs +31 -31
  30. package/dist/cache/TokenCache.d.ts +77 -77
  31. package/dist/cache/TokenCache.mjs +195 -195
  32. package/dist/config/Configuration.d.ts +213 -208
  33. package/dist/config/Configuration.d.ts.map +1 -1
  34. package/dist/config/Configuration.mjs +128 -128
  35. package/dist/config/Configuration.mjs.map +1 -1
  36. package/dist/controllers/ControllerFactory.d.ts +5 -5
  37. package/dist/controllers/ControllerFactory.mjs +25 -25
  38. package/dist/controllers/IController.d.ts +60 -60
  39. package/dist/controllers/NestedAppAuthController.d.ts +202 -202
  40. package/dist/controllers/NestedAppAuthController.mjs +473 -473
  41. package/dist/controllers/StandardController.d.ts +405 -405
  42. package/dist/controllers/StandardController.d.ts.map +1 -1
  43. package/dist/controllers/StandardController.mjs +1334 -1316
  44. package/dist/controllers/StandardController.mjs.map +1 -1
  45. package/dist/controllers/UnknownOperatingContextController.d.ts +86 -86
  46. package/dist/controllers/UnknownOperatingContextController.mjs +256 -256
  47. package/dist/crypto/BrowserCrypto.d.ts +52 -52
  48. package/dist/crypto/BrowserCrypto.mjs +151 -151
  49. package/dist/crypto/CryptoOps.d.ts +74 -74
  50. package/dist/crypto/CryptoOps.mjs +176 -176
  51. package/dist/crypto/PkceGenerator.d.ts +8 -8
  52. package/dist/crypto/PkceGenerator.mjs +54 -54
  53. package/dist/crypto/SignedHttpRequest.d.ts +30 -30
  54. package/dist/crypto/SignedHttpRequest.mjs +39 -39
  55. package/dist/encode/Base64Decode.d.ts +9 -9
  56. package/dist/encode/Base64Decode.mjs +36 -36
  57. package/dist/encode/Base64Encode.d.ts +19 -19
  58. package/dist/encode/Base64Encode.mjs +43 -43
  59. package/dist/error/BrowserAuthError.d.ts +256 -255
  60. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  61. package/dist/error/BrowserAuthError.mjs +265 -264
  62. package/dist/error/BrowserAuthError.mjs.map +1 -1
  63. package/dist/error/BrowserAuthErrorCodes.d.ts +47 -46
  64. package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
  65. package/dist/error/BrowserAuthErrorCodes.mjs +53 -52
  66. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
  67. package/dist/error/BrowserConfigurationAuthError.d.ts +33 -33
  68. package/dist/error/BrowserConfigurationAuthError.mjs +40 -40
  69. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  70. package/dist/error/BrowserConfigurationAuthErrorCodes.d.ts +3 -3
  71. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +7 -7
  72. package/dist/error/NativeAuthError.d.ts +29 -29
  73. package/dist/error/NativeAuthError.mjs +60 -60
  74. package/dist/error/NativeAuthErrorCodes.d.ts +2 -2
  75. package/dist/error/NativeAuthErrorCodes.mjs +6 -6
  76. package/dist/error/NestedAppAuthError.d.ts +14 -14
  77. package/dist/error/NestedAppAuthError.mjs +23 -23
  78. package/dist/event/EventHandler.d.ts +41 -41
  79. package/dist/event/EventHandler.mjs +125 -125
  80. package/dist/event/EventMessage.d.ts +25 -25
  81. package/dist/event/EventMessage.mjs +68 -68
  82. package/dist/event/EventType.d.ts +29 -29
  83. package/dist/event/EventType.mjs +32 -32
  84. package/dist/index.d.ts +40 -40
  85. package/dist/index.mjs +1 -1
  86. package/dist/interaction_client/BaseInteractionClient.d.ts +50 -50
  87. package/dist/interaction_client/BaseInteractionClient.mjs +106 -106
  88. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +4 -4
  89. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +10 -10
  90. package/dist/interaction_client/NativeInteractionClient.d.ts +151 -151
  91. package/dist/interaction_client/NativeInteractionClient.mjs +621 -621
  92. package/dist/interaction_client/PopupClient.d.ts +118 -105
  93. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  94. package/dist/interaction_client/PopupClient.mjs +460 -434
  95. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  96. package/dist/interaction_client/RedirectClient.d.ts +50 -50
  97. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  98. package/dist/interaction_client/RedirectClient.mjs +349 -317
  99. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  100. package/dist/interaction_client/SilentAuthCodeClient.d.ts +23 -23
  101. package/dist/interaction_client/SilentAuthCodeClient.mjs +57 -57
  102. package/dist/interaction_client/SilentCacheClient.d.ts +16 -16
  103. package/dist/interaction_client/SilentCacheClient.mjs +42 -42
  104. package/dist/interaction_client/SilentIframeClient.d.ts +32 -32
  105. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  106. package/dist/interaction_client/SilentIframeClient.mjs +111 -101
  107. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  108. package/dist/interaction_client/SilentRefreshClient.d.ts +20 -20
  109. package/dist/interaction_client/SilentRefreshClient.mjs +47 -47
  110. package/dist/interaction_client/StandardInteractionClient.d.ts +48 -48
  111. package/dist/interaction_client/StandardInteractionClient.mjs +199 -199
  112. package/dist/interaction_handler/InteractionHandler.d.ts +33 -33
  113. package/dist/interaction_handler/InteractionHandler.mjs +93 -93
  114. package/dist/interaction_handler/RedirectHandler.d.ts +32 -32
  115. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  116. package/dist/interaction_handler/RedirectHandler.mjs +135 -134
  117. package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
  118. package/dist/interaction_handler/SilentHandler.d.ts +13 -13
  119. package/dist/interaction_handler/SilentHandler.mjs +134 -134
  120. package/dist/naa/AccountInfo.d.ts +11 -11
  121. package/dist/naa/AuthBridge.d.ts +8 -8
  122. package/dist/naa/AuthResult.d.ts +6 -6
  123. package/dist/naa/BridgeAccountContext.d.ts +12 -12
  124. package/dist/naa/BridgeCapabilities.d.ts +3 -3
  125. package/dist/naa/BridgeError.d.ts +9 -9
  126. package/dist/naa/BridgeError.mjs +7 -7
  127. package/dist/naa/BridgeProxy.d.ts +67 -67
  128. package/dist/naa/BridgeProxy.d.ts.map +1 -1
  129. package/dist/naa/BridgeProxy.mjs +153 -148
  130. package/dist/naa/BridgeProxy.mjs.map +1 -1
  131. package/dist/naa/BridgeRequest.d.ts +7 -7
  132. package/dist/naa/BridgeRequestEnvelope.d.ts +12 -12
  133. package/dist/naa/BridgeResponseEnvelope.d.ts +13 -13
  134. package/dist/naa/BridgeStatusCode.d.ts +11 -11
  135. package/dist/naa/BridgeStatusCode.mjs +14 -14
  136. package/dist/naa/IBridgeProxy.d.ts +10 -10
  137. package/dist/naa/InitContext.d.ts +8 -8
  138. package/dist/naa/TokenRequest.d.ts +18 -18
  139. package/dist/naa/TokenResponse.d.ts +13 -13
  140. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +35 -35
  141. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +179 -179
  142. package/dist/navigation/INavigationClient.d.ts +16 -16
  143. package/dist/navigation/NavigationClient.d.ts +22 -22
  144. package/dist/navigation/NavigationClient.mjs +40 -40
  145. package/dist/navigation/NavigationOptions.d.ts +12 -12
  146. package/dist/network/FetchClient.d.ts +26 -26
  147. package/dist/network/FetchClient.mjs +99 -99
  148. package/dist/operatingcontext/BaseOperatingContext.d.ts +41 -41
  149. package/dist/operatingcontext/BaseOperatingContext.mjs +94 -94
  150. package/dist/operatingcontext/NestedAppOperatingContext.d.ts +34 -34
  151. package/dist/operatingcontext/NestedAppOperatingContext.mjs +71 -71
  152. package/dist/operatingcontext/StandardOperatingContext.d.ts +25 -25
  153. package/dist/operatingcontext/StandardOperatingContext.mjs +43 -43
  154. package/dist/operatingcontext/UnknownOperatingContext.d.ts +25 -25
  155. package/dist/operatingcontext/UnknownOperatingContext.mjs +42 -42
  156. package/dist/packageMetadata.d.ts +2 -2
  157. package/dist/packageMetadata.mjs +4 -4
  158. package/dist/request/AuthorizationCodeRequest.d.ts +8 -8
  159. package/dist/request/AuthorizationUrlRequest.d.ts +8 -8
  160. package/dist/request/ClearCacheRequest.d.ts +10 -10
  161. package/dist/request/EndSessionPopupRequest.d.ts +18 -18
  162. package/dist/request/EndSessionRequest.d.ts +15 -15
  163. package/dist/request/InitializeApplicationRequest.d.ts +8 -8
  164. package/dist/request/PopupRequest.d.ts +34 -34
  165. package/dist/request/PopupWindowAttributes.d.ts +15 -15
  166. package/dist/request/RedirectRequest.d.ts +40 -35
  167. package/dist/request/RedirectRequest.d.ts.map +1 -1
  168. package/dist/request/RequestHelpers.d.ts +13 -13
  169. package/dist/request/RequestHelpers.mjs +53 -53
  170. package/dist/request/SilentRequest.d.ts +33 -33
  171. package/dist/request/SsoSilentRequest.d.ts +29 -29
  172. package/dist/response/AuthenticationResult.d.ts +4 -4
  173. package/dist/response/ResponseHandler.d.ts +7 -7
  174. package/dist/response/ResponseHandler.mjs +36 -36
  175. package/dist/telemetry/BrowserPerformanceClient.d.ts +38 -34
  176. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  177. package/dist/telemetry/BrowserPerformanceClient.mjs +163 -163
  178. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  179. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +21 -21
  180. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +92 -92
  181. package/dist/utils/BrowserConstants.d.ts +182 -180
  182. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  183. package/dist/utils/BrowserConstants.mjs +214 -212
  184. package/dist/utils/BrowserConstants.mjs.map +1 -1
  185. package/dist/utils/BrowserProtocolUtils.d.ts +11 -11
  186. package/dist/utils/BrowserProtocolUtils.mjs +21 -21
  187. package/dist/utils/BrowserUtils.d.ts +75 -75
  188. package/dist/utils/BrowserUtils.mjs +157 -157
  189. package/lib/msal-browser.cjs +19027 -18857
  190. package/lib/msal-browser.cjs.map +1 -1
  191. package/lib/msal-browser.js +19027 -18857
  192. package/lib/msal-browser.js.map +1 -1
  193. package/lib/msal-browser.min.js +62 -62
  194. package/package.json +2 -2
  195. package/src/cache/BrowserCacheManager.ts +95 -0
  196. package/src/config/Configuration.ts +9 -1
  197. package/src/controllers/StandardController.ts +30 -12
  198. package/src/error/BrowserAuthError.ts +2 -0
  199. package/src/error/BrowserAuthErrorCodes.ts +1 -0
  200. package/src/interaction_client/PopupClient.ts +202 -117
  201. package/src/interaction_client/RedirectClient.ts +62 -2
  202. package/src/interaction_client/SilentIframeClient.ts +41 -3
  203. package/src/interaction_handler/RedirectHandler.ts +1 -0
  204. package/src/naa/BridgeProxy.ts +7 -2
  205. package/src/packageMetadata.ts +1 -1
  206. package/src/request/RedirectRequest.ts +5 -0
  207. package/src/telemetry/BrowserPerformanceClient.ts +1 -1
  208. package/src/utils/BrowserConstants.ts +2 -0
@@ -1,209 +1,214 @@
1
- import { SystemOptions, LoggerOptions, INetworkModule, ProtocolMode, OIDCOptions, AzureCloudOptions, ApplicationTelemetry, IPerformanceClient } from "@azure/msal-common";
2
- import { BrowserCacheLocation } from "../utils/BrowserConstants";
3
- import { INavigationClient } from "../navigation/INavigationClient";
4
- export declare const DEFAULT_POPUP_TIMEOUT_MS = 60000;
5
- export declare const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
6
- export declare const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
7
- export declare const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
8
- /**
9
- * Use this to configure the auth options in the Configuration object
10
- */
11
- export type BrowserAuthOptions = {
12
- /**
13
- * Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
14
- */
15
- clientId: string;
16
- /**
17
- * You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
18
- */
19
- authority?: string;
20
- /**
21
- * An array of URIs that are known to be valid. Used in B2C scenarios.
22
- */
23
- knownAuthorities?: Array<string>;
24
- /**
25
- * A string containing the cloud discovery response. Used in AAD scenarios.
26
- */
27
- cloudDiscoveryMetadata?: string;
28
- /**
29
- * A string containing the .well-known/openid-configuration endpoint response
30
- */
31
- authorityMetadata?: string;
32
- /**
33
- * The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
34
- */
35
- redirectUri?: string;
36
- /**
37
- * The redirect URI where the window navigates after a successful logout.
38
- */
39
- postLogoutRedirectUri?: string | null;
40
- /**
41
- * Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.
42
- */
43
- navigateToLoginRequestUrl?: boolean;
44
- /**
45
- * Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
46
- */
47
- clientCapabilities?: Array<string>;
48
- /**
49
- * Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
50
- */
51
- protocolMode?: ProtocolMode;
52
- /**
53
- * Enum that configures options for the OIDC protocol mode.
54
- */
55
- OIDCOptions?: OIDCOptions;
56
- /**
57
- * Enum that represents the Azure Cloud to use.
58
- */
59
- azureCloudOptions?: AzureCloudOptions;
60
- /**
61
- * Flag of whether to use the local metadata cache
62
- */
63
- skipAuthorityMetadataCache?: boolean;
64
- /**
65
- * App supports nested app auth or not; defaults to
66
- *
67
- * @deprecated This flag is deprecated and will be removed in the next major version. createNestablePublicClientApplication should be used instead.
68
- */
69
- supportsNestedAppAuth?: boolean;
70
- };
71
- /** @internal */
72
- export type InternalAuthOptions = Required<BrowserAuthOptions> & {
73
- OIDCOptions: Required<OIDCOptions>;
74
- };
75
- /**
76
- * Use this to configure the below cache configuration options:
77
- */
78
- export type CacheOptions = {
79
- /**
80
- * Used to specify the cacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
81
- */
82
- cacheLocation?: BrowserCacheLocation | string;
83
- /**
84
- * Used to specify the temporaryCacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
85
- */
86
- temporaryCacheLocation?: BrowserCacheLocation | string;
87
- /**
88
- * If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.
89
- */
90
- storeAuthStateInCookie?: boolean;
91
- /**
92
- * If set, MSAL sets the "Secure" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.
93
- */
94
- secureCookies?: boolean;
95
- /**
96
- * If set, MSAL will attempt to migrate cache entries from older versions on initialization. By default this flag is set to true if cacheLocation is localStorage, otherwise false.
97
- */
98
- cacheMigrationEnabled?: boolean;
99
- /**
100
- * Flag that determines whether access tokens are stored based on requested claims
101
- */
102
- claimsBasedCachingEnabled?: boolean;
103
- };
104
- export type BrowserSystemOptions = SystemOptions & {
105
- /**
106
- * Used to initialize the Logger object (See ClientConfiguration.ts)
107
- */
108
- loggerOptions?: LoggerOptions;
109
- /**
110
- * Network interface implementation
111
- */
112
- networkClient?: INetworkModule;
113
- /**
114
- * Override the methods used to navigate to other webpages. Particularly useful if you are using a client-side router
115
- */
116
- navigationClient?: INavigationClient;
117
- /**
118
- * Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.
119
- */
120
- windowHashTimeout?: number;
121
- /**
122
- * Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.
123
- */
124
- iframeHashTimeout?: number;
125
- /**
126
- * Sets the timeout for waiting for a response hash in an iframe or popup
127
- */
128
- loadFrameTimeout?: number;
129
- /**
130
- * Maximum time the library should wait for a frame to load
131
- * @deprecated This was previously needed for older browsers which are no longer supported by MSAL.js. This option will be removed in the next major version
132
- */
133
- navigateFrameWait?: number;
134
- /**
135
- * Time to wait for redirection to occur before resolving promise
136
- */
137
- redirectNavigationTimeout?: number;
138
- /**
139
- * Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.
140
- */
141
- asyncPopups?: boolean;
142
- /**
143
- * Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).
144
- */
145
- allowRedirectInIframe?: boolean;
146
- /**
147
- * Flag to enable native broker support (e.g. acquiring tokens from WAM on Windows)
148
- */
149
- allowNativeBroker?: boolean;
150
- /**
151
- * Sets the timeout for waiting for the native broker handshake to resolve
152
- */
153
- nativeBrokerHandshakeTimeout?: number;
154
- /**
155
- * Sets the interval length in milliseconds for polling the location attribute in popup windows (default is 30ms)
156
- */
157
- pollIntervalMilliseconds?: number;
158
- };
159
- /**
160
- * Telemetry Options
161
- */
162
- export type BrowserTelemetryOptions = {
163
- /**
164
- * Telemetry information sent on request
165
- * - appName: Unique string name of an application
166
- * - appVersion: Version of the application using MSAL
167
- */
168
- application?: ApplicationTelemetry;
169
- client?: IPerformanceClient;
170
- };
171
- /**
172
- * This object allows you to configure important elements of MSAL functionality and is passed into the constructor of PublicClientApplication
173
- */
174
- export type Configuration = {
175
- /**
176
- * This is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
177
- */
178
- auth: BrowserAuthOptions;
179
- /**
180
- * This is where you configure cache location and whether to store cache in cookies
181
- */
182
- cache?: CacheOptions;
183
- /**
184
- * This is where you can configure the network client, logger, token renewal offset
185
- */
186
- system?: BrowserSystemOptions;
187
- /**
188
- * This is where you can configure telemetry data and options
189
- */
190
- telemetry?: BrowserTelemetryOptions;
191
- };
192
- /** @internal */
193
- export type BrowserConfiguration = {
194
- auth: InternalAuthOptions;
195
- cache: Required<CacheOptions>;
196
- system: Required<BrowserSystemOptions>;
197
- telemetry: Required<BrowserTelemetryOptions>;
198
- };
199
- /**
200
- * MSAL function that sets the default options when not explicitly configured from app developer
201
- *
202
- * @param auth
203
- * @param cache
204
- * @param system
205
- *
206
- * @returns Configuration object
207
- */
208
- export declare function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem, telemetry: userInputTelemetry, }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration;
1
+ import { SystemOptions, LoggerOptions, INetworkModule, ProtocolMode, OIDCOptions, AzureCloudOptions, ApplicationTelemetry, IPerformanceClient } from "@azure/msal-common";
2
+ import { BrowserCacheLocation } from "../utils/BrowserConstants";
3
+ import { INavigationClient } from "../navigation/INavigationClient";
4
+ export declare const DEFAULT_POPUP_TIMEOUT_MS = 60000;
5
+ export declare const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
6
+ export declare const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
7
+ export declare const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
8
+ /**
9
+ * Use this to configure the auth options in the Configuration object
10
+ */
11
+ export type BrowserAuthOptions = {
12
+ /**
13
+ * Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
14
+ */
15
+ clientId: string;
16
+ /**
17
+ * You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
18
+ */
19
+ authority?: string;
20
+ /**
21
+ * An array of URIs that are known to be valid. Used in B2C scenarios.
22
+ */
23
+ knownAuthorities?: Array<string>;
24
+ /**
25
+ * A string containing the cloud discovery response. Used in AAD scenarios.
26
+ */
27
+ cloudDiscoveryMetadata?: string;
28
+ /**
29
+ * A string containing the .well-known/openid-configuration endpoint response
30
+ */
31
+ authorityMetadata?: string;
32
+ /**
33
+ * The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
34
+ */
35
+ redirectUri?: string;
36
+ /**
37
+ * The redirect URI where the window navigates after a successful logout.
38
+ */
39
+ postLogoutRedirectUri?: string | null;
40
+ /**
41
+ * Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.
42
+ */
43
+ navigateToLoginRequestUrl?: boolean;
44
+ /**
45
+ * Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
46
+ */
47
+ clientCapabilities?: Array<string>;
48
+ /**
49
+ * Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
50
+ */
51
+ protocolMode?: ProtocolMode;
52
+ /**
53
+ * Enum that configures options for the OIDC protocol mode.
54
+ */
55
+ OIDCOptions?: OIDCOptions;
56
+ /**
57
+ * Enum that represents the Azure Cloud to use.
58
+ */
59
+ azureCloudOptions?: AzureCloudOptions;
60
+ /**
61
+ * Flag of whether to use the local metadata cache
62
+ */
63
+ skipAuthorityMetadataCache?: boolean;
64
+ /**
65
+ * App supports nested app auth or not; defaults to
66
+ *
67
+ * @deprecated This flag is deprecated and will be removed in the next major version. createNestablePublicClientApplication should be used instead.
68
+ */
69
+ supportsNestedAppAuth?: boolean;
70
+ /**
71
+ * Callback that will be passed the url that MSAL will navigate to in redirect flows. Returning false in the callback will stop navigation.
72
+ */
73
+ onRedirectNavigate?: (url: string) => boolean | void;
74
+ };
75
+ /** @internal */
76
+ export type InternalAuthOptions = Omit<Required<BrowserAuthOptions>, "onRedirectNavigate"> & {
77
+ OIDCOptions: Required<OIDCOptions>;
78
+ onRedirectNavigate?: (url: string) => boolean | void;
79
+ };
80
+ /**
81
+ * Use this to configure the below cache configuration options:
82
+ */
83
+ export type CacheOptions = {
84
+ /**
85
+ * Used to specify the cacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
86
+ */
87
+ cacheLocation?: BrowserCacheLocation | string;
88
+ /**
89
+ * Used to specify the temporaryCacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
90
+ */
91
+ temporaryCacheLocation?: BrowserCacheLocation | string;
92
+ /**
93
+ * If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.
94
+ */
95
+ storeAuthStateInCookie?: boolean;
96
+ /**
97
+ * If set, MSAL sets the "Secure" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.
98
+ */
99
+ secureCookies?: boolean;
100
+ /**
101
+ * If set, MSAL will attempt to migrate cache entries from older versions on initialization. By default this flag is set to true if cacheLocation is localStorage, otherwise false.
102
+ */
103
+ cacheMigrationEnabled?: boolean;
104
+ /**
105
+ * Flag that determines whether access tokens are stored based on requested claims
106
+ */
107
+ claimsBasedCachingEnabled?: boolean;
108
+ };
109
+ export type BrowserSystemOptions = SystemOptions & {
110
+ /**
111
+ * Used to initialize the Logger object (See ClientConfiguration.ts)
112
+ */
113
+ loggerOptions?: LoggerOptions;
114
+ /**
115
+ * Network interface implementation
116
+ */
117
+ networkClient?: INetworkModule;
118
+ /**
119
+ * Override the methods used to navigate to other webpages. Particularly useful if you are using a client-side router
120
+ */
121
+ navigationClient?: INavigationClient;
122
+ /**
123
+ * Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.
124
+ */
125
+ windowHashTimeout?: number;
126
+ /**
127
+ * Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.
128
+ */
129
+ iframeHashTimeout?: number;
130
+ /**
131
+ * Sets the timeout for waiting for a response hash in an iframe or popup
132
+ */
133
+ loadFrameTimeout?: number;
134
+ /**
135
+ * Maximum time the library should wait for a frame to load
136
+ * @deprecated This was previously needed for older browsers which are no longer supported by MSAL.js. This option will be removed in the next major version
137
+ */
138
+ navigateFrameWait?: number;
139
+ /**
140
+ * Time to wait for redirection to occur before resolving promise
141
+ */
142
+ redirectNavigationTimeout?: number;
143
+ /**
144
+ * Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.
145
+ */
146
+ asyncPopups?: boolean;
147
+ /**
148
+ * Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).
149
+ */
150
+ allowRedirectInIframe?: boolean;
151
+ /**
152
+ * Flag to enable native broker support (e.g. acquiring tokens from WAM on Windows)
153
+ */
154
+ allowNativeBroker?: boolean;
155
+ /**
156
+ * Sets the timeout for waiting for the native broker handshake to resolve
157
+ */
158
+ nativeBrokerHandshakeTimeout?: number;
159
+ /**
160
+ * Sets the interval length in milliseconds for polling the location attribute in popup windows (default is 30ms)
161
+ */
162
+ pollIntervalMilliseconds?: number;
163
+ };
164
+ /**
165
+ * Telemetry Options
166
+ */
167
+ export type BrowserTelemetryOptions = {
168
+ /**
169
+ * Telemetry information sent on request
170
+ * - appName: Unique string name of an application
171
+ * - appVersion: Version of the application using MSAL
172
+ */
173
+ application?: ApplicationTelemetry;
174
+ client?: IPerformanceClient;
175
+ };
176
+ /**
177
+ * This object allows you to configure important elements of MSAL functionality and is passed into the constructor of PublicClientApplication
178
+ */
179
+ export type Configuration = {
180
+ /**
181
+ * This is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
182
+ */
183
+ auth: BrowserAuthOptions;
184
+ /**
185
+ * This is where you configure cache location and whether to store cache in cookies
186
+ */
187
+ cache?: CacheOptions;
188
+ /**
189
+ * This is where you can configure the network client, logger, token renewal offset
190
+ */
191
+ system?: BrowserSystemOptions;
192
+ /**
193
+ * This is where you can configure telemetry data and options
194
+ */
195
+ telemetry?: BrowserTelemetryOptions;
196
+ };
197
+ /** @internal */
198
+ export type BrowserConfiguration = {
199
+ auth: InternalAuthOptions;
200
+ cache: Required<CacheOptions>;
201
+ system: Required<BrowserSystemOptions>;
202
+ telemetry: Required<BrowserTelemetryOptions>;
203
+ };
204
+ /**
205
+ * MSAL function that sets the default options when not explicitly configured from app developer
206
+ *
207
+ * @param auth
208
+ * @param cache
209
+ * @param system
210
+ *
211
+ * @returns Configuration object
212
+ */
213
+ export declare function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem, telemetry: userInputTelemetry, }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration;
209
214
  //# sourceMappingURL=Configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../src/config/Configuration.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,aAAa,EACb,cAAc,EAGd,YAAY,EACZ,WAAW,EAKX,iBAAiB,EACjB,oBAAoB,EAGpB,kBAAkB,EAGrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,oBAAoB,EAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAC9C,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAC/C,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,eAAO,MAAM,0CAA0C,OAAO,C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