storyboard-webclient/src/app/auth
Michael Krotscheck 61d33605c4 Access tokens are now refreshed in preflight promises.
This patch modifies the access token header to return a promise, which
will resolve only if it has performed a best-effort attempt to provide
a valid OAuth token.

This provides several benefits:
- It removes the need for a timer inside the refresh manager. In fact,
  the entire refresh manager is now obsolete.
- No HTTP request is sent to the API without a token.
- Significant reduction of 401 errors being raised to the user.
- Validating a token now simply requires a single HTTP request, after
  which the AccessToken provider can be assumed to be current.
- Makes 401 error handling mostly irrelevant. The remaining edge case is
  when a refresh token expires.

Change-Id: I52168485c8236f93a85d3d2b6033a01293e7b747
2016-02-24 11:09:26 -08:00
..
controller Logging in no longer causes page refresh. 2016-02-24 10:37:53 -08:00
directive Add grunt-lintspaces module to check cr-at-end in js files 2015-01-07 13:29:23 +01:00
http Access tokens are now refreshed in preflight promises. 2016-02-24 11:09:26 -08:00
notification Access tokens are now refreshed in preflight promises. 2016-02-24 11:09:26 -08:00
provider Add grunt-lintspaces module to check cr-at-end in js files 2015-01-07 13:29:23 +01:00
resolver Merge "Some project ui/ux updates" 2014-05-22 16:48:07 +00:00
service Access tokens are now refreshed in preflight promises. 2016-02-24 11:09:26 -08:00
template Stop using fixed-width containers 2015-08-17 15:26:37 +00:00
module.js Access tokens are now refreshed in preflight promises. 2016-02-24 11:09:26 -08:00