Skip to content
This repository was archived by the owner on Aug 6, 2019. It is now read-only.

Releases: vokal/vokal-ng-api

8.0.0

Choose a tag to compare

@Tathanen Tathanen released this 13 Mar 18:44

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 both APIRequestComplete and APIRequestError. Requests that are canceled using the $cancel method will not be affected by this change.

7.1.1

Choose a tag to compare

@Tathanen Tathanen released this 03 Feb 17:40

Fixing some bugs that arose with Angular 1.6. Thanks @FrankyMartz for the catch.

7.1.0

Choose a tag to compare

@Tathanen Tathanen released this 30 Sep 18:44

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 APIAuthorizationFailure event now exposes an options object as a second listener argument containing the options that were passed into the original $http request that returned a 401

7.0.0

Choose a tag to compare

@Tathanen Tathanen released this 14 Sep 18:47

New features:

  • APIRequestUnauthorized is broadcast if requests repeated after a 401 resolution still return a 401
  • $cancel now halts the HTTP request itself, and doesn't reject the main promise by default
  • keyName method 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
  • $cancel no longer rejects the main promise by default, but can be instructed to do so by passing the reject parameter
  • The authorization header has been renamed from AUTHORIZATION to Authorization. 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 use keyName to change it back.

6.1.0

Choose a tag to compare

@Tathanen Tathanen released this 03 Aug 21:38

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

Choose a tag to compare

@Tathanen Tathanen released this 01 Aug 20:55

Significant updates to the handling of unauthenticated requests:

  • unauthorizedInterrupt now 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, and APIAuthorizationFailure will be broadcast if the issue cannot be resolved.
  • If unauthorizedInterrupt is 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 loginPath to disable unauthorizedInterrupt functionality on your login page, safely allowing for semantically valid 401 responses to bad login credentials.

Breaking changes:

  • The APIRequestUnauthorized event and the functionality surrounding unauthorizedInterrupt now only applies to a 401 error response. Previously a 403 would trigger the same functionality.

5.2.0

Choose a tag to compare

@Tathanen Tathanen released this 01 Apr 15:48

Support unique names for multiple APIs.

5.1.0

Choose a tag to compare

@Tathanen Tathanen released this 16 Nov 22:37

More stringent String type requirements for setKey, per #36

5.0.1

Choose a tag to compare

@jrit jrit released this 05 Nov 20:38

Fixes from #35

5.0.0

Choose a tag to compare

@jrit jrit released this 05 Nov 19:29

includes #34 humps transforms for query params