This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
Releases: mulesoft-labs/js-client-oauth2
Releases · mulesoft-labs/js-client-oauth2
Convert expiration to number
Fixed
- Convert the expiration to a number before updating the expiration time
Handle OAuth response errors before status error
Changed
- Handle OAuth 2.0 errors, set the error bodies, before checking the status code (58dd277)
Parse error response body
Changed
- Parse the
err.body
property into an object (519609a)
Use Popsicle
Changed
- Use
popsicle
for requests under node.js (eca0ae3)
Refactor Request Flow
Changed
- Using a smaller build for handling the request flow
- When refreshing a token, merge the new data with the old data and create a new token instance
Removed
- Killed the ability to do requests directly from the user object
Allow Paths for `getToken`
Changed
- Allow paths for
getToken(uri)
Merged Method Options
Changed
- Provide and merge options on all methods
Non-UMD Build
Changed
- Removed UMD-compatible build in favour of CommonJS
- Removed custom URL parsing logic in favour of Node.js/Browserified/etc modules
- Replace custom inlined functions with NPM packages
- Updated Popsicle to 3.x
Major Release with Popsicle 1.0
Changed
- Using
[email protected]
which breaks backward compatibility - Custom options (
rejectUnauthorized
,agent
) can be passed through usingoptions
Variadic Create Token
Changed
- Create token method can now accept variadic arguments
oauth2.owner.getToken
now accepts an options override