PatientBank/Core — pull request #34 by pfletch1023 (2014-03-18 02:59:41+00:00)
Title: Client-side authentication (!!!)

Here's a nifty way of authenticating a user before initializing certain controllers. `resolve` let's us ensure a valid access token and current user BEFORE initializing a given controller. What's even cooler is that a `resolve` gets passed down to child states, so we only need to add it to parent states like `/record`, `/access` and `/account`. We can therefore pass the `currentUser` param into relevant controllers instead of having to use `ensureCurrentUser(...)` inside each one.