コード例 #1
0
        public void SaveRefreshToken(RefreshTokenCacheItem refreshTokenItem)
        {
            TokenCacheKey            key    = refreshTokenItem.GetTokenCacheKey();
            ISharedPreferencesEditor editor = _accessTokenSharedPreference.Edit();

            editor.PutString(key.ToString(), JsonHelper.SerializeToJson(refreshTokenItem));
            editor.Apply();
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public void SaveRefreshToken(RefreshTokenCacheItem refreshTokenItem)
 {
     TokenCacheDictionary[refreshTokenItem.GetTokenCacheKey().ToString()] = JsonHelper.SerializeToJson(refreshTokenItem);
 }