Socket
Socket
Sign inDemoInstall

openid-client

Package Overview
Dependencies
35
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.2 to 0.5.3

3

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.2
- https://github.com/panva/node-openid-client/compare/v0.5.0...v0.5.3
- added: token_type_hint for introspection and revocation
- fix: handle refresh w/o id_token

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

@@ -361,16 +361,23 @@ 'use strict';

revoke(token) {
revoke(token, hint) {
assert.ok(this.issuer.revocation_endpoint || this.issuer.token_revocation_endpoint,
'issuer must be configured with revocation endpoint');
assert.ok(!hint || typeof hint === 'string', 'hint must be a string');
const endpoint = this.issuer.revocation_endpoint || this.issuer.token_revocation_endpoint;
return this.authenticatedPost(endpoint, { body: { token } },
const body = { token };
if (hint) body.token_type_hint = hint;
return this.authenticatedPost(endpoint, { body },
response => JSON.parse(response.body));
}
introspect(token) {
introspect(token, hint) {
assert.ok(this.issuer.introspection_endpoint || this.issuer.token_introspection_endpoint,
'issuer must be configured with introspection endpoint');
assert.ok(!hint || typeof hint === 'string', 'hint must be a string');
const endpoint = this.issuer.introspection_endpoint || this.issuer.token_introspection_endpoint;
return this.authenticatedPost(endpoint, { body: { token } },
const body = { token };
if (hint) body.token_type_hint = hint;
return this.authenticatedPost(endpoint, { body },
response => JSON.parse(response.body));

@@ -377,0 +384,0 @@ }

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

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -140,3 +140,3 @@ # openid-client

```js
client.revoke(token) // => Promise
client.revoke(token, [tokenTypeHint]) // => Promise
.then(function (response) {

@@ -149,3 +149,3 @@ console.log('revoked token %s', token, response);

```js
client.introspect(token) // => Promise
client.introspect(token, [tokenTypeHint]) // => Promise
.then(function (response) {

@@ -152,0 +152,0 @@ console.log('token details %j', response);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc