public bool CheckIfTokenBlacklisted(string _token, string _email, string _deviceName)
        {
            DAL.TokenDB dalProvider = new DAL.TokenDB();

            var token = dalProvider.GetToken(_email, _deviceName);

            if (token != null)
            {
                if (token.Blacklisted == true)
                {
                    return(true);
                }
            }
            return(false);
        }
        public Entities.Token CheckIfTokenExistsAndValid(string _token, string _email, string _deviceName)
        {
            DAL.TokenDB dalProvider = new DAL.TokenDB();

            var token = dalProvider.GetToken(_email, _deviceName);

            if (token != null)
            {
                if (token.ExpirationDate >= DateTime.Now)
                {
                    return(token);
                }
            }

            return(null);
        }