simple-oauth2
Advanced tools
Comparing version 1.5.2 to 1.6.0
# Changelog | ||
## 1.6.0 | ||
* Ignore access tokens without expiration properties (backport) | ||
## v1.5.2 | ||
@@ -4,0 +8,0 @@ * Publish new version, to fix the 1.5.1 version which mistakenly included some breaking changes |
'use strict'; | ||
const url = require('url'); | ||
const addSeconds = require('date-fns/add_seconds'); | ||
const isAfter = require('date-fns/is_after'); | ||
const isDate = require('date-fns/is_date'); | ||
const parse = require('date-fns/parse'); | ||
const parseToken = require('./parse-token'); | ||
const coreModule = require('./../core'); | ||
@@ -19,14 +17,3 @@ | ||
function AccessToken(token) { | ||
this.token = token; | ||
if ('expires_at' in this.token) { | ||
if (!isDate(this.token.expires_at)) { | ||
this.token.expires_at = parse(this.token.expires_at); | ||
} | ||
} else { | ||
this.token.expires_at = addSeconds( | ||
new Date(), | ||
Number.parseInt(token.expires_in, 10) | ||
); | ||
} | ||
this.token = parseToken(token); | ||
} | ||
@@ -33,0 +20,0 @@ |
{ | ||
"name": "simple-oauth2", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"description": "Node.js client for OAuth2", | ||
@@ -5,0 +5,0 @@ "author": "Andrea Reginato <andrea.reginato@gmail.com>", |
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
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
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
32428
16
441
0