# File lib/ruby_fogbugz/interface.rb, line 17
    def authenticate
      response = @http.request :logon,
                               params: {
                                 email: @options[:email],
                                 password: @options[:password]
                               }
      begin
        @token ||= @xml.parse(response)['token']
        if @token.nil? || @token == ''
          raise Fogbugz::AuthenticationException, @xml.parse(response)['error']
        end
      rescue REXML::ParseException
        raise Fogbugz::AuthenticationException, "Looks like there was an issue with authentication (to #{@options[:uri]} as #{@options[:email]}) - probably the host/url."
      end
      @token
    end