Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-oauth2

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-oauth2 - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

lib/access-token-parser.js

16

CHANGELOG.md
# Changelog
## 4.2.0
### Improvements
- [#354](https://github.com/lelylan/simple-oauth2/pull/354) Add support for custom http options to access token refresh and revoke operations
### Maintainance
- [#329](https://github.com/lelylan/simple-oauth2/pull/329) Documentation updates for persistent access token refresh
- [#330](https://github.com/lelylan/simple-oauth2/pull/330) Upgrade module to use eslint v7
- [#331](https://github.com/lelylan/simple-oauth2/pull/331) Internal module reorganization
- [#333](https://github.com/lelylan/simple-oauth2/pull/333) Add template for issues
- [#341](https://github.com/lelylan/simple-oauth2/pull/341) Segregate integration tests by responsability area
- [#352](https://github.com/lelylan/simple-oauth2/pull/352) Use Node 14 as default runtime version for development. Document support matrix
- [#353](https://github.com/lelylan/simple-oauth2/pull/353) Use [joi](https://www.npmjs.com/package/joi) instead of the deprecated [@hapi/joi](https://www.npmjs.com/package/@hapi/joi) module
## 4.1.0
### Improvements
- [#398](https://github.com/lelylan/simple-oauth2/pull/328) Add support to refresh persitent access tokens
- [#328](https://github.com/lelylan/simple-oauth2/pull/328) Add support to refresh persistent access tokens

@@ -7,0 +21,0 @@ ### Maintainance

14

index.js
'use strict';
const Client = require('./lib/client');
const Config = require('./lib/config');
const AuthorizationCodeGrant = require('./lib/grants/authorization-code');
const ResourceOwnerPasswordGrant = require('./lib/grants/resource-owner-password');
const ClientCredentialsGrant = require('./lib/grants/client-credentials');
const { Client } = require('./lib/client');
const AuthorizationCodeGrantType = require('./lib/authorization-code-grant-type');
const ResourceOwnerPasswordGrantType = require('./lib/resource-owner-password-grant-type');
const ClientCredentialsGrantType = require('./lib/client-credentials-grant-type');
class AuthorizationCode extends AuthorizationCodeGrant {
class AuthorizationCode extends AuthorizationCodeGrantType {
constructor(options) {

@@ -18,3 +18,3 @@ const config = Config.apply(options);

class ClientCredentials extends ClientCredentialsGrant {
class ClientCredentials extends ClientCredentialsGrantType {
constructor(options) {

@@ -28,3 +28,3 @@ const config = Config.apply(options);

class ResourceOwnerPassword extends ResourceOwnerPasswordGrant {
class ResourceOwnerPassword extends ResourceOwnerPasswordGrantType {
constructor(options) {

@@ -31,0 +31,0 @@ const config = Config.apply(options);

'use strict';
const Joi = require('@hapi/joi');
const { authorizationMethodEnum, bodyFormatEnum, encodingModeEnum } = require('./request-options');
const Joi = require('joi');
const { authorizationMethodEnum, bodyFormatEnum, credentialsEncodingModeEnum } = require('./client');

@@ -28,4 +28,4 @@ // https://tools.ietf.org/html/draft-ietf-oauth-v2-31#appendix-A.1

.string()
.valid(...Object.values(encodingModeEnum))
.default(encodingModeEnum.STRICT),
.valid(...Object.values(credentialsEncodingModeEnum))
.default(credentialsEncodingModeEnum.STRICT),
bodyFormat: Joi

@@ -32,0 +32,0 @@ .string()

{
"name": "simple-oauth2",
"version": "4.1.0",
"version": "4.2.0",
"description": "Node.js client for OAuth2",

@@ -49,5 +49,5 @@ "author": "Andrea Reginato <andrea.reginato@gmail.com>",

"@hapi/hoek": "^9.0.4",
"@hapi/joi": "^17.1.1",
"@hapi/wreck": "^17.0.0",
"debug": "^4.1.1"
"debug": "^4.1.1",
"joi": "^17.3.0"
},

@@ -62,11 +62,11 @@ "devDependencies": {

"doctoc": "^1.4.0",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"eslint": "^7.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.21.2",
"nock": "^12.0.3",
"nyc": "^15.0.1"
"nyc": "^15.1.0"
},
"volta": {
"node": "12.18.0"
"node": "14.15.1"
}
}

@@ -39,4 +39,9 @@ # Simple OAuth2

The node client library is tested against Node 12 LTS and newer versions. Older node versions are unsupported.
| Version | Node support |
|----------------------------------------------------------------------------------|---------------------|
| [3.x](https://github.com/lelylan/simple-oauth2/tree/3.x) | Node 8.x or higher |
| [4.x (Current)](https://github.com/lelylan/simple-oauth2/tree/master) | Node 12.x or higher |
Older node versions are unsupported.
## Usage

@@ -188,3 +193,3 @@

Once we have determined the access token needs refreshing with the [.expired()](./API.md##expiredexpirationwindowseconds--boolean) method, we can finally refresh it with a [.refresh()](#refreshparams--promiseaccesstoken) method call.
Once we have determined the access token needs refreshing with the [.expired()](./API.md#expiredexpirationwindowseconds--boolean) method, we can finally refresh it with a [.refresh()](./API.md#await-refreshparams--accesstoken) method call.

@@ -191,0 +196,0 @@ ```javascript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc