simple-oauth2
Advanced tools
Comparing version 1.5.1 to 2.0.0
# Changelog | ||
## Next | ||
## v2.0.0 | ||
@@ -8,2 +8,3 @@ * Replace internal request library to wreck | ||
* Replace callback interface with async/await | ||
* Improve integration tests coverage | ||
@@ -10,0 +11,0 @@ ## v1.5.1 |
# Contributing | ||
Fork the repo on github and send a pull requests with topic branches to the ```develop``` branch. Do not forget to provide specs to your contribution. | ||
## Repository | ||
* The master branch will always point to the npm latest published version. | ||
* Develop will contain the latest development/testing/new-features changes. | ||
* Every npm release will have a corresponding git tag. The **CHANGELOG.md** will be updated on every release too. | ||
* The master branch will always point to the npm latest published version. | ||
* Develop will contain the latest development/testing/new-features changes. | ||
* Every npm release will have a corresponding git tag. The **CHANGELOG.md** will be updated on every release too. | ||
## Running specs | ||
* Fork and clone the repository (`develop` branch). | ||
@@ -17,2 +20,3 @@ * Run `npm install` for dependencies. | ||
## Updating the docs | ||
Currently, the project documentation it´s on README.md file, a table of contents is generated using a tool called [doctoc](https://github.com/thlorenz/doctoc). So if you updated this file (specially if headers are modified), please use: | ||
@@ -25,2 +29,3 @@ | ||
### Coding guidelines | ||
To contribute to this project, please follow the [airbnb](https://github.com/airbnb/javascript) guidelines. |
@@ -28,7 +28,3 @@ 'use strict'; | ||
}).required(), | ||
http: Joi.object().keys({ | ||
headers: Joi.object().default({ | ||
Accept: 'application/json', | ||
}), | ||
}).default().unknown(true), | ||
http: Joi.object().unknown(true), | ||
options: Joi.object().keys({ | ||
@@ -35,0 +31,0 @@ bodyFormat: Joi.any().only('form', 'json').default('form'), |
@@ -50,3 +50,3 @@ 'use strict'; | ||
return createAccessToken(response); | ||
return new AccessToken(response); | ||
} | ||
@@ -53,0 +53,0 @@ |
@@ -8,5 +8,10 @@ 'use strict'; | ||
const defaultHeaders = { | ||
Accept: 'application/json', | ||
}; | ||
module.exports = (config) => { | ||
const httpOptions = Object.assign({}, config.http, { | ||
baseUrl: config.auth.tokenHost, | ||
headers: Object.assign({}, defaultHeaders, (config.http && config.http.headers)), | ||
}); | ||
@@ -13,0 +18,0 @@ |
{ | ||
"name": "simple-oauth2", | ||
"version": "1.5.1", | ||
"version": "2.0.0", | ||
"description": "Node.js client for OAuth2", | ||
@@ -20,3 +20,4 @@ "author": "Andrea Reginato <andrea.reginato@gmail.com>", | ||
"pretest": "npm run lint", | ||
"test": "mocha ", | ||
"test": "nyc mocha", | ||
"posttest": "nyc check-coverage", | ||
"lint": "eslint .", | ||
@@ -28,2 +29,13 @@ "fix": "eslint . --fix", | ||
}, | ||
"nyc": { | ||
"check-coverage": true, | ||
"lines": 100, | ||
"statements": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"reporter": [ | ||
"lcov", | ||
"text-summary" | ||
] | ||
}, | ||
"dependencies": { | ||
@@ -37,2 +49,3 @@ "date-fns": "^1.3.0", | ||
"chai": "^4.1.2", | ||
"chance": "^1.0.13", | ||
"doctoc": "^1.0.0", | ||
@@ -42,6 +55,8 @@ "eslint": "^4.7.2", | ||
"eslint-plugin-import": "^2.2.0", | ||
"lodash": "^4.17.5", | ||
"mocha": "^4.0.1", | ||
"nock": "^9.0.13" | ||
"nock": "^9.0.13", | ||
"nyc": "^11.4.1" | ||
}, | ||
"license": "Apache-2.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27224
12
0
10