public void SignOff(SessionInfo signOffInfo) { serverProvider.SignOff(signOffInfo); }
public void SignOff(SessionInfo sessionInfo) { var serverSession = repoServerSession.Query(o => o.CientId == sessionInfo.ClientId && o.AccessToken == sessionInfo.AccessToken).FirstOrDefault(); if (serverSession != null) { try { trans.BeginTransaction(); repoServerSession.DeleteBatch(o => o.FromCientId == serverSession.CientId && o.FromSessionId == serverSession.SessionId); repoServerSession.Delete(serverSession); trans.Commit(); } catch { trans.Rollback(); serverSession.AccessTokenExpiryTime = DateTime.Now; repoServerSession.Update(serverSession); } } }