guardian/frontend — pull request #2454 by marchibbins (2013-12-03 17:47:13+00:00)
Title: Identity sign in trigger

Adds a method to the `identity/api` module to get the user object of a signed in user, or otherwise send them off to the sign page if not. The ID login redirects the user back to the start page once the flow is complete, the JS method takes an argument to specify another URL if you wish (the Identity API performs it's own verification to determine whether any return URL is safe).

Also removed the double-init of the module in the app bootstrap, now the Identity bootstrap is called only once, which itself deals with the API module.