public void WriteAccount(Microsoft.Identity.Client.CacheV2.Schema.Account account) { var accountJson = StorageJsonUtils.AccountToJson(account); string accountPath = _credentialPathManager.GetAccountPath(account); ReadModifyWrite( accountPath, fileContentJson => { JsonMerge(accountJson, fileContentJson); return(accountJson); }); }
public OperationStatus WriteAccount(string correlationId, Microsoft.Identity.Client.CacheV2.Schema.Account account) { try { //using (new StorageManagerDelegateManager(this, new TokenCacheNotificationArgs(null, null), true)) { _storageWorker.WriteAccount(account); return(OperationStatus.CreateSuccess()); } } catch (Exception ex) { return(HandleException(ex)); } }
public string GetAccountPath(Microsoft.Identity.Client.CacheV2.Schema.Account account) { return(GetAccountPath(account.HomeAccountId, account.Environment, account.Realm)); }