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 3.7.4 to 3.8.0

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Change Log

# [3.8.0](https://github.com/panva/node-openid-client/compare/v3.7.4...v3.8.0) (2019-11-07)
### Features
* allow tokenType for userinfo to use as authorization header scheme ([4eaa75f](https://github.com/panva/node-openid-client/commit/4eaa75f714a744f9e712615dedc6702f4f9b7a64))
## [3.7.4](https://github.com/panva/node-openid-client/compare/v3.7.3...v3.7.4) (2019-10-24)

@@ -7,0 +16,0 @@

21

lib/client.js

@@ -38,4 +38,4 @@ /* eslint-disable max-classes-per-file */

function bearer(token) {
return `Bearer ${token}`;
function authorizationHeaderValue(token, tokenType = 'Bearer') {
return `${tokenType} ${token}`;
}

@@ -900,3 +900,3 @@

const opts = merge({
verb: 'get',
verb: 'GET',
via: 'header',

@@ -909,2 +909,3 @@ }, options);

}
opts.tokenType = opts.tokenType || token.token_type;
token = token.access_token;

@@ -930,3 +931,7 @@ }

default:
requestOpts = { headers: { Authorization: bearer(token) } };
requestOpts = {
headers: {
Authorization: authorizationHeaderValue(token, opts.tokenType),
},
};
}

@@ -1191,3 +1196,3 @@

Accept: 'application/jwt',
Authorization: bearer(def.access_token || tokens[sourceName]),
Authorization: authorizationHeaderValue(def.access_token || tokens[sourceName]),
},

@@ -1266,3 +1271,5 @@ };

const response = await request.call(this, {
headers: initialAccessToken ? { Authorization: bearer(initialAccessToken) } : undefined,
headers: initialAccessToken ? {
Authorization: authorizationHeaderValue(initialAccessToken),
} : undefined,
json: true,

@@ -1299,3 +1306,3 @@ body: properties,

json: true,
headers: { Authorization: bearer(registrationAccessToken) },
headers: { Authorization: authorizationHeaderValue(registrationAccessToken) },
});

@@ -1302,0 +1309,0 @@ const responseBody = processResponse(response, { bearer: true });

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

@@ -44,4 +44,4 @@ "keywords": [

"got": "^9.6.0",
"jose": "^1.10.1",
"lodash": "^4.17.13",
"jose": "^1.10.2",
"lodash": "^4.17.15",
"lru-cache": "^5.1.1",

@@ -59,9 +59,9 @@ "make-error": "^1.3.5",

"chai": "^4.2.0",
"dtslint": "^0.9.8",
"eslint": "^6.5.1",
"dtslint": "^1.0.2",
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.8",
"mocha": "^6.2.1",
"nock": "^11.4.0",
"husky": "^3.0.9",
"mocha": "^6.2.2",
"nock": "^11.6.0",
"nyc": "^14.1.1",

@@ -71,3 +71,3 @@ "readable-mock-req": "^0.2.2",

"timekeeper": "^2.2.0",
"typescript": "^3.6.3"
"typescript": "^3.6.4"
},

@@ -74,0 +74,0 @@ "engines": {

@@ -437,4 +437,5 @@ /// <reference types="node" />

* will be used automatically.
* @param options Options for the UserInfo request.
*/
userinfo(accessToken: TokenSet | string): Promise<UserinfoResponse>;
userinfo(accessToken: TokenSet | string, options?: { verb?: 'GET' | 'POST', via?: 'header' | 'body' | 'query', tokenType?: string }): Promise<UserinfoResponse>;

@@ -441,0 +442,0 @@ /**

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