public Stream DeleteByRefreshToken(string refreshToken) { IDeleteAccessTokenBusinessService businessService = (IDeleteAccessTokenBusinessService)BusinessFactory.Create(Keywords.DeleteAccessToken); OperationResult result = businessService.DeleteByRefreshToken(Convert.ToString(refreshToken)); return(result.ToJsonStream()); }
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); }