public void SaveToken(TokenCacheItem tokenItem) { TokenCacheKey key = tokenItem.GetTokenCacheKey(); ISharedPreferencesEditor editor = _accessTokenSharedPreference.Edit(); editor.PutString(key.ToString(), JsonHelper.SerializeToJson(tokenItem)); editor.Apply(); }
public void SaveToken(TokenCacheItem tokenItem) { CryptographyHelper helper = new CryptographyHelper(); string hashed = helper.CreateSha256Hash(tokenItem.GetTokenCacheKey().ToString()); ApplicationDataCompositeValue composite = new ApplicationDataCompositeValue(); string serializedToken = JsonHelper.SerializeToJson(tokenItem); SetCacheValue(composite, serializedToken); _tokenContainer.Values[hashed] = composite; }
public void SaveToken(TokenCacheItem tokenItem) { TokenCacheDictionary[tokenItem.GetTokenCacheKey().ToString()] = JsonHelper.SerializeToJson(tokenItem); }