Пример #1
0
        public object GetUserFromTokenValue(Token token)
        {
            TokenResponse tokenResponse = new TokenResponse();

            try
            {
                tokenResponse.Token = _tokenService.GetWithToken(token.TokenValue);
                if (tokenResponse.Token == null)
                {
                    tokenResponse.setError(Common.SystemConstants.SystemConstannts.ERROR_CODES.NOTFOUND);
                }
                else
                {
                    tokenResponse.setError(Common.SystemConstants.SystemConstannts.ERROR_CODES.SUCCESS);
                }
            }
            catch (Exception ex)
            {
                tokenResponse.Token = null;
                tokenResponse.setError(Common.SystemConstants.SystemConstannts.ERROR_CODES.SYSTEMERROR);
            }
            return(tokenResponse);
        }