61d33605c4
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 |
||
---|---|---|
.. | ||
controller | ||
directive | ||
http | ||
notification | ||
provider | ||
resolver | ||
service | ||
template | ||
module.js |