           if cache.length == 0 or (item for item in cache when item.issue is issue).length == 0
             cache.push({issue: issue, expires: now + 120000})
             msg.http(jiraUrl + "/rest/api/latest/issue/" + issue)
+              .auth(auth)
               .get() (err, res, body) ->
                 try
                   key = JSON.parse(body).key

  jiraUrl = "https://" + jiraDomain
  http = require 'https'

  http.get {host: jiraDomain, path: "/rest/api/latest/project"}, (res) ->
    data = ''
    res.on 'data', (chunk) ->
      data += chunk.toString()

#
# Configuration:
#   HUBOT_JIRA_DOMAIN
#   HUBOT_JIRA_USERNAME (optional)
#   HUBOT_JIRA_PASSWORD (optional)
#
# Commands:
# 
