BYU-ODH/hlrdesk — pull request #15 by webnard (2014-11-27 16:47:38+00:00)
Title: Migrates CAS code to external module.

I figured what we had for CAS would be useful for any number of Node.js projects on BYU campus, so I published a [separate module](https://github.com/BYU-ODH/BYU-CAS-npm) for it.

There are a few differences in this code that are worth mentioning. First, the promise now gets _rejected_ if the ticket is invalid. (Before, it was resolved with `status: false`). Second, I've pared down what gets resolved/rejected. Since the promise is only resolved on a successful ticket, the resolve function only passes an object with a `username` property; there will be no more `error` or `status` properties, because the resolution implies that they are `null` and `true`, respectively. I am also rejecting with an `Error` rather than an object with the properties `username`, `status`, and `error`. The error message will be whatever error message is given by CAS, and the `username` and `status` fields are implicitly `null` and `false`, respectively.

@Luke1298, I realize this contradicts our design document, but take a look and see if it fits in with what you're trying to do.