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

openid-client

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openid-client - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

lib/unix_timestamp.js

2

CHANGELOG.md
Following semver, 1.0.0 will mark the first API stable release and commence of this file,
until then please use the compare views of github for reference.
- https://github.com/panva/node-openid-client/compare/v0.5.0...v0.5.1
- https://github.com/panva/node-openid-client/compare/v0.5.0...v0.5.2
- fix: handle refresh w/o id_token

@@ -6,0 +6,0 @@ - fix: ignore nonce values when refreshing w/ id_token

@@ -153,2 +153,3 @@ 'use strict';

if (idToken instanceof TokenSet) {
/* istanbul ignore next */
if (!idToken.id_token) {

@@ -242,6 +243,2 @@ throw new Error('id_token not present in TokenSet');

if (payloadObject.azp !== undefined) {
assert.equal(this.client_id, payloadObject.azp, 'azp must be the client_id');
}
if (!Array.isArray(payloadObject.aud)) {

@@ -253,2 +250,6 @@ payloadObject.aud = [payloadObject.aud];

if (payloadObject.azp !== undefined) {
assert.equal(this.client_id, payloadObject.azp, 'azp must be the client_id');
}
assert.ok(payloadObject.aud.indexOf(this.client_id) !== -1, 'aud is missing the client_id');

@@ -255,0 +256,0 @@

@@ -7,3 +7,3 @@ 'use strict';

module.exports = function tokenHash(token, alg) {
const size = alg.slice(-3);
const size = String(alg).slice(-3);
let hashingAlg;

@@ -10,0 +10,0 @@

'use strict';
const now = require('./unix_timestamp');
class TokenSet {

@@ -9,9 +11,7 @@ constructor(values) {

set expires_in(value) { // eslint-disable-line camelcase
const now = new Date() / 1000 | 0;
this.expires_at = now + Number(value);
this.expires_at = now() + Number(value);
}
get expires_in() { // eslint-disable-line camelcase
const now = new Date() / 1000 | 0;
return Math.max.apply(null, [this.expires_at - now, 0]);
return Math.max.apply(null, [this.expires_at - now(), 0]);
}

@@ -18,0 +18,0 @@

{
"name": "openid-client",
"version": "0.5.1",
"version": "0.5.2",
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js",

@@ -9,3 +9,4 @@ "main": "lib/index.js",

"test": "make test",
"lint": "eslint lib example test --fix"
"lint": "eslint lib example test",
"lint-fix": "eslint lib example test --fix"
},

@@ -35,5 +36,5 @@ "repository": "panva/node-openid-client",

"co-mocha": "^1.1.3",
"eslint": "*",
"eslint-config-airbnb-base": "*",
"eslint-plugin-import": "*",
"eslint": "^3.0.0",
"eslint-config-airbnb-base": "^7.0.0",
"eslint-plugin-import": "^1.0.0",
"istanbul": "^0.4.4",

@@ -47,3 +48,4 @@ "koa": "^1.2.0",

"nock": "^8.0.0",
"sinon": "^1.17.4"
"sinon": "^1.17.4",
"timekeeper": "^0.1.1"
},

@@ -50,0 +52,0 @@ "dependencies": {

@@ -110,10 +110,2 @@ # openid-client

### Getting authorization url
```js
client.authorizationUrl({
redirect_uri: 'https://client.example.com/callback',
scope: 'openid email',
}); // => String
```
### Processing callback

@@ -120,0 +112,0 @@ ```js

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