Socket
Socket
Sign inDemoInstall

openid-client

Package Overview
Dependencies
Maintainers
1
Versions
181
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 5.0.1 to 5.0.2

27

lib/helpers/request.js

@@ -42,2 +42,15 @@ const assert = require('assert');

function send(req, body, contentType) {
if (contentType) {
req.removeHeader('content-type');
req.setHeader('content-type', contentType);
}
if (body) {
req.removeHeader('content-length');
req.setHeader('content-length', Buffer.byteLength(body));
req.write(body);
}
req.end();
}
module.exports = async function request(options, { accessToken, mTLS = false, DPoP } = {}) {

@@ -102,16 +115,12 @@ let url;

return (async () => {
// if (GET (and other && form, json, body)) throw;
if (json) {
req.removeHeader('content-type');
req.setHeader('content-type', 'application/json');
req.write(JSON.stringify(json));
send(req, JSON.stringify(json), 'application/json');
} else if (form) {
req.removeHeader('content-type');
req.setHeader('content-type', 'application/x-www-form-urlencoded');
req.write(querystring.stringify(form));
send(req, querystring.stringify(form), 'application/x-www-form-urlencoded');
} else if (body) {
req.write(body);
send(req, body);
} else {
send(req);
}
req.end();
[response] = await Promise.race([once(req, 'response'), once(req, 'timeout')]);

@@ -118,0 +127,0 @@

{
"name": "openid-client",
"version": "5.0.1",
"version": "5.0.2",
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",

@@ -5,0 +5,0 @@ "keywords": [

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