예제 #1
0
        public static void SaveCache(Dictionary <string, TenantCacheInfo> cache)
        {
            var file = GetCacheFile();
            var json = JObject.FromObject(cache);

            ProtectedFile.WriteAllText(file, json.ToString());
        }
예제 #2
0
        public static void SaveCache(Dictionary <TokenCacheKey, string> cache)
        {
            var file = GetCacheFile();
            var dict = cache.ToDictionary(p => p.Value, p => p.Key);
            var json = JObject.FromObject(dict);

            ProtectedFile.WriteAllText(file, json.ToString());
        }
예제 #3
0
 public static void SaveRecentToken(AuthenticationResult authResult)
 {
     ProtectedFile.WriteAllText(GetRecentTokenFile(), authResult.Serialize());
 }