-
Notifications
You must be signed in to change notification settings - Fork 7
/
ClientApplication.yml
533 lines (503 loc) · 17.7 KB
/
ClientApplication.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
### YamlMime:TSType
name: ClientApplication
uid: '@azure/msal-browser.ClientApplication'
package: '@azure/msal-browser'
summary: ''
fullName: ClientApplication
remarks: ''
isPreview: false
isDeprecated: false
type: class
constructors:
- name: ClientApplication(Configuration)
uid: '@azure/msal-browser.ClientApplication.constructor'
package: '@azure/msal-browser'
summary: ''
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'new ClientApplication(configuration: Configuration)'
parameters:
- id: configuration
type: <xref uid="@azure/msal-browser.Configuration" />
description: |
Object for the MSAL PublicClientApplication instance
methods:
- name: acquireTokenByCode(AuthorizationCodeRequest)
uid: '@azure/msal-browser.ClientApplication.acquireTokenByCode'
package: '@azure/msal-browser'
summary: >
This function redeems an authorization code (passed as code) from the eSTS
token endpoint.
This authorization code should be acquired server-side using a
confidential client to acquire a spa_code.
This API is not indended for normal authorization code acquisition and
redemption.
Redemption of this authorization code will not require PKCE, as it was
acquired by a confidential client.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function acquireTokenByCode(request: AuthorizationCodeRequest):
Promise<AuthenticationResult>
parameters:
- id: request
type: <xref uid="@azure/msal-browser.AuthorizationCodeRequest" />
description: ''
return:
description: >-
A promise that is fulfilled when this function has completed, or
rejected if an error was raised.
type: Promise<AuthenticationResult>
- name: acquireTokenPopup(PopupRequest)
uid: '@azure/msal-browser.ClientApplication.acquireTokenPopup'
package: '@azure/msal-browser'
summary: >-
Use when you want to obtain an access_token for your API via opening a
popup window in the user's browser
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function acquireTokenPopup(request: PopupRequest):
Promise<AuthenticationResult>
parameters:
- id: request
type: <xref uid="@azure/msal-browser.PopupRequest" />
description: |+
return:
description: >-
A promise that is fulfilled when this function has completed, or
rejected if an error was raised.
type: Promise<AuthenticationResult>
- name: acquireTokenRedirect(RedirectRequest)
uid: '@azure/msal-browser.ClientApplication.acquireTokenRedirect'
package: '@azure/msal-browser'
summary: >
Use when you want to obtain an access_token for your API by redirecting
the user's browser window to the authorization endpoint. This function
redirects
the page, so any code that follows this function will not execute.
IMPORTANT: It is NOT recommended to have code that is dependent on the
resolution of the Promise. This function will navigate away from the
current
browser window. It currently returns a Promise in order to reflect the
asynchronous nature of the code running in this function.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function acquireTokenRedirect(request: RedirectRequest): Promise<void>'
parameters:
- id: request
type: <xref uid="@azure/msal-browser.RedirectRequest" />
description: |+
return:
description: ''
type: Promise<void>
- name: addEventCallback(EventCallbackFunction)
uid: '@azure/msal-browser.ClientApplication.addEventCallback'
package: '@azure/msal-browser'
summary: Adds event callbacks to array
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function addEventCallback(callback: EventCallbackFunction): string |
null
parameters:
- id: callback
type: <xref uid="@azure/msal-browser.EventCallbackFunction" />
description: |+
return:
description: ''
type: string | null
- name: addPerformanceCallback(PerformanceCallbackFunction)
uid: '@azure/msal-browser.ClientApplication.addPerformanceCallback'
package: '@azure/msal-browser'
summary: Registers a callback to receive performance events.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function addPerformanceCallback(callback: PerformanceCallbackFunction):
string
parameters:
- id: callback
type: PerformanceCallbackFunction
description: ''
return:
description: ''
type: string
- name: disableAccountStorageEvents()
uid: '@azure/msal-browser.ClientApplication.disableAccountStorageEvents'
package: '@azure/msal-browser'
summary: >-
Removes event listener that emits an event when a user account is added or
removed from localstorage in a different browser tab or window
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: function disableAccountStorageEvents()
- name: enableAccountStorageEvents()
uid: '@azure/msal-browser.ClientApplication.enableAccountStorageEvents'
package: '@azure/msal-browser'
summary: >-
Adds event listener that emits an event when a user account is added or
removed from localstorage in a different browser tab or window
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: function enableAccountStorageEvents()
- name: getAccountByHomeId(string)
uid: '@azure/msal-browser.ClientApplication.getAccountByHomeId'
package: '@azure/msal-browser'
summary: |-
Returns the signed in account matching homeAccountId.
(the account object is created at the time of successful login)
or null when no matching account is found
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAccountByHomeId(homeAccountId: string): AccountInfo | null'
parameters:
- id: homeAccountId
type: string
description: ''
return:
description: The account object stored in MSAL
type: AccountInfo | null
- name: getAccountByLocalId(string)
uid: '@azure/msal-browser.ClientApplication.getAccountByLocalId'
package: '@azure/msal-browser'
summary: |-
Returns the signed in account matching localAccountId.
(the account object is created at the time of successful login)
or null when no matching account is found
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAccountByLocalId(localAccountId: string): AccountInfo | null'
parameters:
- id: localAccountId
type: string
description: ''
return:
description: The account object stored in MSAL
type: AccountInfo | null
- name: getAccountByUsername(string)
uid: '@azure/msal-browser.ClientApplication.getAccountByUsername'
package: '@azure/msal-browser'
summary: >-
Returns the signed in account matching username.
(the account object is created at the time of successful login)
or null when no matching account is found.
This API is provided for convenience but getAccountById should be used for
best reliability
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAccountByUsername(userName: string): AccountInfo | null'
parameters:
- id: userName
type: string
description: ''
return:
description: The account object stored in MSAL
type: AccountInfo | null
- name: getActiveAccount()
uid: '@azure/msal-browser.ClientApplication.getActiveAccount'
package: '@azure/msal-browser'
summary: Gets the currently active account
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getActiveAccount(): AccountInfo | null'
return:
description: ''
type: AccountInfo | null
- name: getAllAccounts()
uid: '@azure/msal-browser.ClientApplication.getAllAccounts'
package: '@azure/msal-browser'
summary: |-
Returns all accounts that MSAL currently has data for.
(the account object is created at the time of successful login)
or empty array when no accounts are found
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getAllAccounts(): AccountInfo[]'
return:
description: Array of account objects in cache
type: 'AccountInfo[]'
- name: getConfiguration()
uid: '@azure/msal-browser.ClientApplication.getConfiguration'
package: '@azure/msal-browser'
summary: Returns the configuration object
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getConfiguration(): BrowserConfiguration'
return:
description: ''
type: <xref uid="@azure/msal-browser.BrowserConfiguration" />
- name: getLogger()
uid: '@azure/msal-browser.ClientApplication.getLogger'
package: '@azure/msal-browser'
summary: Returns the logger instance
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getLogger(): Logger'
return:
description: ''
type: Logger
- name: getTokenCache()
uid: '@azure/msal-browser.ClientApplication.getTokenCache'
package: '@azure/msal-browser'
summary: Gets the token cache for the application.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getTokenCache(): ITokenCache'
return:
description: ''
type: <xref uid="@azure/msal-browser.ITokenCache" />
- name: handleRedirectPromise(string)
uid: '@azure/msal-browser.ClientApplication.handleRedirectPromise'
package: '@azure/msal-browser'
summary: >-
Event handler function which allows users to fire events after the
PublicClientApplication object
has loaded during redirect flows. This should be invoked on all page loads
involved in redirect
auth flows.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function handleRedirectPromise(hash?: string):
Promise<AuthenticationResult | null>
parameters:
- id: hash
type: string
description: >-
Hash to process. Defaults to the current value of
window.location.hash. Only needs to be provided explicitly if the
response to be handled is not contained in the current value.
return:
description: >-
Token response or null. If the return value is null, then no auth
redirect was detected.
type: Promise<AuthenticationResult | null>
- name: initialize()
uid: '@azure/msal-browser.ClientApplication.initialize'
package: '@azure/msal-browser'
summary: >-
Initializer function to perform async startup tasks such as connecting to
WAM extension
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function initialize(): Promise<void>'
return:
description: ''
type: Promise<void>
- name: 'initializeWrapperLibrary(WrapperSKU, string)'
uid: '@azure/msal-browser.ClientApplication.initializeWrapperLibrary'
package: '@azure/msal-browser'
summary: >-
Called by wrapper libraries (Angular & React) to set SKU and Version
passed down to telemetry, logger, etc.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function initializeWrapperLibrary(sku: WrapperSKU, version: string)'
parameters:
- id: sku
type: <xref uid="@azure/msal-browser.WrapperSKU" />
description: ''
- id: version
type: string
description: |+
- name: logout(EndSessionRequest)
uid: '@azure/msal-browser.ClientApplication.logout'
package: '@azure/msal-browser'
summary: Deprecated logout function. Use logoutRedirect or logoutPopup instead
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: ''
syntax:
content: 'function logout(logoutRequest?: EndSessionRequest): Promise<void>'
parameters:
- id: logoutRequest
type: <xref uid="@azure/msal-browser.EndSessionRequest" />
description: ''
return:
description: ''
type: Promise<void>
- name: logoutPopup(EndSessionPopupRequest)
uid: '@azure/msal-browser.ClientApplication.logoutPopup'
package: '@azure/msal-browser'
summary: >-
Clears local cache for the current user then opens a popup window
prompting the user to sign-out of the server
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function logoutPopup(logoutRequest?: EndSessionPopupRequest):
Promise<void>
parameters:
- id: logoutRequest
type: <xref uid="@azure/msal-browser.EndSessionPopupRequest" />
description: |+
return:
description: ''
type: Promise<void>
- name: logoutRedirect(EndSessionRequest)
uid: '@azure/msal-browser.ClientApplication.logoutRedirect'
package: '@azure/msal-browser'
summary: >-
Use to log out the current user, and redirect the user to the
postLogoutRedirectUri.
Default behaviour is to redirect the user to `window.location.href`.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function logoutRedirect(logoutRequest?: EndSessionRequest):
Promise<void>
parameters:
- id: logoutRequest
type: <xref uid="@azure/msal-browser.EndSessionRequest" />
description: |+
return:
description: ''
type: Promise<void>
- name: removeEventCallback(string)
uid: '@azure/msal-browser.ClientApplication.removeEventCallback'
package: '@azure/msal-browser'
summary: Removes callback with provided id from callback array
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function removeEventCallback(callbackId: string)'
parameters:
- id: callbackId
type: string
description: |+
- name: removePerformanceCallback(string)
uid: '@azure/msal-browser.ClientApplication.removePerformanceCallback'
package: '@azure/msal-browser'
summary: Removes a callback registered with addPerformanceCallback.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function removePerformanceCallback(callbackId: string): boolean'
parameters:
- id: callbackId
type: string
description: ''
return:
description: ''
type: boolean
- name: setActiveAccount(AccountInfo | null)
uid: '@azure/msal-browser.ClientApplication.setActiveAccount'
package: '@azure/msal-browser'
summary: >-
Sets the account to use as the active account. If no account is passed to
the acquireToken APIs, then MSAL will use this active account.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function setActiveAccount(account: AccountInfo | null)'
parameters:
- id: account
type: AccountInfo | null
description: |+
- name: setLogger(Logger)
uid: '@azure/msal-browser.ClientApplication.setLogger'
package: '@azure/msal-browser'
summary: >-
Replaces the default logger set in configurations with new Logger with new
configurations
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function setLogger(logger: Logger)'
parameters:
- id: logger
type: Logger
description: |
Logger instance
- name: setNavigationClient(INavigationClient)
uid: '@azure/msal-browser.ClientApplication.setNavigationClient'
package: '@azure/msal-browser'
summary: Sets navigation client
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function setNavigationClient(navigationClient: INavigationClient)'
parameters:
- id: navigationClient
type: <xref uid="@azure/msal-browser.INavigationClient" />
description: |+
- name: ssoSilent(SsoSilentRequest)
uid: '@azure/msal-browser.ClientApplication.ssoSilent'
package: '@azure/msal-browser'
summary: >-
This function uses a hidden iframe to fetch an authorization code from the
eSTS. There are cases where this may not work:
- Any browser using a form of Intelligent Tracking Prevention
- If there is not an established session with the service
In these cases, the request must be done inside a popup or full frame
redirect.
For the cases where interaction is required, you cannot send a request
with prompt=none.
If your refresh token has expired, you can use this function to fetch a
new set of tokens silently as long as
you session on the server still exists.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function ssoSilent(request: SsoSilentRequest):
Promise<AuthenticationResult>
parameters:
- id: request
type: <xref uid="@azure/msal-browser.SsoSilentRequest" />
description: |+
return:
description: >-
A promise that is fulfilled when this function has completed, or
rejected if an error was raised.
type: Promise<AuthenticationResult>