-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
BrowserCustomizationOptions.cs
68 lines (59 loc) · 1.93 KB
/
BrowserCustomizationOptions.cs
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Microsoft.Identity.Client;
namespace Azure.Identity
{
/// <summary>
/// Options to customize browser view.
/// </summary>
public class BrowserCustomizationOptions
{
/// <summary>
/// Specifies if the public client application should used an embedded web browser
/// or the system default browser
/// </summary>
public bool? UseEmbeddedWebView { get; set; }
internal SystemWebViewOptions SystemBrowserOptions;
private SystemWebViewOptions systemWebViewOptions
{
get
{
SystemBrowserOptions ??= new SystemWebViewOptions();
return SystemBrowserOptions;
}
}
/// <summary>
/// Property to set HtmlMessageSuccess of SystemWebViewOptions from MSAL,
/// which the browser will show to the user when the user finishes authenticating successfully.
/// </summary>
public string SuccessMessage
{
get
{
return systemWebViewOptions.HtmlMessageSuccess;
}
set
{
systemWebViewOptions.HtmlMessageSuccess = value;
}
}
/// <summary>
/// Property to set HtmlMessageError of SystemWebViewOptions from MSAL,
/// which the browser will show to the user when the user finishes authenticating, but an error occurred.
/// You can use a string format e.g. "An error has occurred: {0} details: {1}".
/// </summary>
public string ErrorMessage
{
get
{
return systemWebViewOptions.HtmlMessageError;
}
set
{
systemWebViewOptions.HtmlMessageError = value;
}
}
}
}