Esempio n. 1
0
        public async Task RemoveSessionsAsync(int userId, long[] sessionsIds)
        {
            await jweBlackListService.AddUserTokensToBlackListAsync(userId, sessionsIds);

            await db.LongSessions.Where(x => x.UserId == userId && sessionsIds.Contains(x.Id)).DeleteAsync();
        }
Esempio n. 2
0
        public virtual async Task LogoutAsync(int userId, long sessionId)
        {
            await jweBlackListService.AddUserTokensToBlackListAsync(userId, new[] { sessionId });

            await db.LongSessions.Where(x => x.UserId == userId && x.Id == sessionId).DeleteAsync();
        }