コード例 #1
0
        public Stream DeleteByRefreshToken(string refreshToken)
        {
            IDeleteAccessTokenBusinessService businessService = (IDeleteAccessTokenBusinessService)BusinessFactory.Create(Keywords.DeleteAccessToken);
            OperationResult result = businessService.DeleteByRefreshToken(Convert.ToString(refreshToken));

            return(result.ToJsonStream());
        }
コード例 #2
0
        protected OperationResult SaveNewccessToken(AccessToken accessToken)
        {
            IDeleteAccessTokenBusinessService bs = (IDeleteAccessTokenBusinessService)BusinessFactory.Create("Find.Tools.OAuthServerManager.AccessToken");
            OperationResult result = bs.DeleteByRefreshToken(accessToken.RefreshToken);

            if (result.Result)
            {
                Com.Wiseape.Framework.BaseBusinessService <AccessToken> bs2 = (Com.Wiseape.Framework.BaseBusinessService <AccessToken>)bs;
                result = bs2.Add(accessToken);
            }
            return(result);
        }