-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
interactiveBrowserCredentialOptions.ts
49 lines (42 loc) · 1.54 KB
/
interactiveBrowserCredentialOptions.ts
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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { TokenCredentialOptions } from "../client/identityClient";
/**
* The "login style" to use in the authentication flow:
* - "redirect" redirects the user to the authentication page and then
* redirects them back to the page once authentication is completed.
* - "popup" opens a new browser window through with the redirect flow
* is initiated. The user's existing browser window does not leave
* the current page
*/
export type BrowserLoginStyle = "redirect" | "popup";
/**
* Defines options for the InteractiveBrowserCredential class.
*/
export interface InteractiveBrowserCredentialOptions extends TokenCredentialOptions {
/**
* Specifies whether a redirect or a popup window should be used to
* initiate the user authentication flow. Possible values are "redirect"
* or "popup" (default) for browser and "popup" (default) for node.
*
*/
loginStyle?: BrowserLoginStyle;
/**
* Gets the redirect URI of the application. This should be same as the value
* in the application registration portal. Defaults to `window.location.href`.
*/
redirectUri?: string | (() => string);
/**
* Gets the URI to which the user will be redirected when logging out.
* Defaults to `window.location.href`.
*/
postLogoutRedirectUri?: string | (() => string);
/**
* The Azure Active Directory tenant (directory) ID.
*/
tenantId?: string;
/**
* The client (application) ID of an App Registration in the tenant.
*/
clientId?: string;
}