Пример #1
0
        public long GetSessionUserId(string token)
        {
            var userId = _dataService.GetSessionUserId(CreateTokenHash(token));

            if (userId == 0)
            {
                throw new UnauthorizedAccessException($"Token {token} is not authorized");
            }
            return(userId);
        }
Пример #2
0
 public IObservable <long> GetSessionUserId(string token)
 {
     return(_dataService.GetSessionUserId(CreateTokenHash(token)));
 }