public SessionResponse GetSession()
        {
            SessionResponse result = null;
            Stream          stream = Execute(RequestType.Session);

            if (stream != null)
            {
                result = JsonConvert.DeserializeObject <SessionResponse>(new StreamReader(stream).ReadToEnd());
            }
            return(result);
        }
        public Authentication(string server, string virtualProxy, string port, string certificate, string userDirectory, string user, string sessionId = "")
        {
            _ticketRequest = new TicketRequest {
                UserDirectory = userDirectory, UserId = user
            };
            _sessionRequest = new SessionRequest {
                UserDirectory = userDirectory, UserId = user, SessionId = sessionId
            };
            _ticketResponse  = new TicketResponse();
            _sessionResponse = new SessionResponse();

            _certificate  = certificate;
            _server       = server;
            _port         = port;
            _virtualProxy = virtualProxy;
        }