-
Notifications
You must be signed in to change notification settings - Fork 1
Authentication
Robby Ronk edited this page Aug 15, 2013
·
6 revisions
Used in the resolve property of routes that require authentication.
- If there is no saved authentication, open a dialog with links to login to our authentication providers.
- If there is a saved authentication, resolve the factory promise which allows the view and controller to load.
Authentication happens by a user clicking on a link taking the browser to an API URL which handles the authentication and the provider interactions.
Save the attempted route change as a session cookie (intendedRoute
) by listening to the $locationChangeStart
event.
- No view
- No controller
- Only a single resolve,
redirectToIntendedRoute
.
- Saves the token from the route parameters to
crsToken
cookie, using$cookies
. - Redirects the user to the route in the
intendedRoute
cookie, using$location
.
Sets the Authorization
header to the token in the crsToken
cookie.