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