-
Notifications
You must be signed in to change notification settings - Fork 0
/
CacheSettings.cs
25 lines (18 loc) · 1.24 KB
/
CacheSettings.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
// Licensed under the MIT License.
using Microsoft.Identity.Client.Extensions.Msal;
namespace GraphTutorial;
public static class CacheSettings
{
// computing the root directory is not very simple on Linux and Mac, so a helper is provided
private static readonly string s_cacheFilePath =
Path.Combine(MsalCacheHelper.UserRootDirectory, "msal.contoso.cache");
public static readonly string CacheFileName = Path.GetFileName(s_cacheFilePath);
public static readonly string CacheDir = Path.GetDirectoryName(s_cacheFilePath);
public static readonly string KeyChainServiceName = "Contoso.MyProduct";
public static readonly string KeyChainAccountName = "MSALCache";
public static readonly string LinuxKeyRingSchema = "com.contoso.devtools.tokencache";
public static readonly string LinuxKeyRingCollection = MsalCacheHelper.LinuxKeyRingDefaultCollection;
public static readonly string LinuxKeyRingLabel = "MSAL token cache for all Contoso dev tool apps.";
public static readonly KeyValuePair<string, string> LinuxKeyRingAttr1 = new KeyValuePair<string, string>("Version", "1");
public static readonly KeyValuePair<string, string> LinuxKeyRingAttr2 = new KeyValuePair<string, string>("ProductGroup", "MyApps");
}