public static void SaveCache(Dictionary <string, TenantCacheInfo> cache) { var file = GetCacheFile(); var json = JObject.FromObject(cache); ProtectedFile.WriteAllText(file, json.ToString()); }
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()); }
public static void SaveRecentToken(AuthenticationResult authResult) { ProtectedFile.WriteAllText(GetRecentTokenFile(), authResult.Serialize()); }