This repository was archived by the owner on Aug 6, 2019. It is now read-only.
Releases: vokal/vokal-ng-api
Releases · vokal/vokal-ng-api
Release list
8.0.0
Breaking changes:
- The unauthorizedInterrupt property now defaults to
false - API requests that fail due to connection errors (HTTP status
-1) will now reject the request promise like other errors, and broadcast bothAPIRequestCompleteandAPIRequestError. Requests that are canceled using the$cancelmethod will not be affected by this change.
7.1.1
Fixing some bugs that arose with Angular 1.6. Thanks @FrankyMartz for the catch.
7.1.0
New features:
resetAuthResolution()resets the service's authorization-resolution state, so further requests won't be queued or re-run as part of a currently ongoing resolution attempt- The
APIAuthorizationFailureevent now exposes anoptionsobject as a second listener argument containing the options that were passed into the original $http request that returned a401
7.0.0
New features:
APIRequestUnauthorizedis broadcast if requests repeated after a 401 resolution still return a 401$cancelnow halts the HTTP request itself, and doesn't reject the main promise by defaultkeyNamemethod allows customization of the authorization header name
Additional breaking changes/notes:
- If a repeated request after a 401 resolution still returns a 401, any other requests in the repeat queue are silently canceled
$cancelno longer rejects the main promise by default, but can be instructed to do so by passing therejectparameter- The authorization header has been renamed from
AUTHORIZATIONtoAuthorization. Since HTTP headers are supposed to be case-insensitive this shouldn't be breaking, but in case you were referencing it explicitly in case-sensitive JavaScript, you can usekeyNameto change it back.
6.1.0
Added ability to specify API routes via loginRoutes that are exempt from authorization-resolution logic, similar to loginPath, to safely allow semantically valid 401 responses to bad login credentials. Can now correctly handle login requests in headers, lightboxes, etc.
6.0.0
Significant updates to the handling of unauthenticated requests:
unauthorizedInterruptnow accepts a function that will be run when an API call comes back as unauthorized. The original request will be re-run if the supplied function can resolve the authorization issue, andAPIAuthorizationFailurewill be broadcast if the issue cannot be resolved.- If
unauthorizedInterruptis set to a function, any other API calls that return as unauthorized while the first one is being resolved will be held in a queue and re-run if the first call is resolved successfully. - Specify
loginPathto disableunauthorizedInterruptfunctionality on your login page, safely allowing for semantically valid401responses to bad login credentials.
Breaking changes:
- The
APIRequestUnauthorizedevent and the functionality surroundingunauthorizedInterruptnow only applies to a401error response. Previously a403would trigger the same functionality.