-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsHelper.cs
More file actions
76 lines (66 loc) · 2.08 KB
/
SettingsHelper.cs
File metadata and controls
76 lines (66 loc) · 2.08 KB
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
using System;
using System.Configuration;
namespace LinkWise.Modules.OneDrive
{
//Stores all of the AADSettings required for single sign-on
public class SettingsHelper
{
private static string _clientId = ConfigurationManager.AppSettings["ida:ClientId"] ?? ConfigurationManager.AppSettings["ida:ClientID"];
private static string _appKey = ConfigurationManager.AppSettings["ida:AppKey"] ?? ConfigurationManager.AppSettings["ida:Password"];
private static string _authorizationUri = ConfigurationManager.AppSettings["ida:AuthorizationUri"];
private static string _graphResourceId = ConfigurationManager.AppSettings["ida:GraphResourceId"];
private static string _tenantId = ConfigurationManager.AppSettings["ida:TenantID"];
private static string _authority = "https://login.windows.net/" + _tenantId;
private static string _discoverySvcResourceId = "https://api.office.com/discovery/";
private static string _discoverySvcEndpointUri = "https://api.office.com/discovery/v1.0/me/";
public static string ClientId
{
get
{
return _clientId;
}
}
public static string AppKey
{
get
{
return _appKey;
}
}
public static string AuthorizationUri
{
get
{
return _authorizationUri;
}
}
public static string Authority
{
get
{
return _authority;
}
}
public static string AADGraphResourceId
{
get
{
return _graphResourceId;
}
}
public static string DiscoveryServiceResourceId
{
get
{
return _discoverySvcResourceId;
}
}
public static Uri DiscoveryServiceEndpointUri
{
get
{
return new Uri(_discoverySvcEndpointUri);
}
}
}
}