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

oidc-provider

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oidc-provider - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

13

lib/actions/authentication.js

@@ -94,4 +94,7 @@ 'use strict';

const needed = _.chain(conf.responseTypesSupported).map((rt) => rt.split(' '))
.flatten().uniq().value();
const needed = _.chain(conf.responseTypesSupported)
.map((rt) => rt.split(' '))
.flatten()
.uniq()
.value();

@@ -214,3 +217,3 @@ const handlers = {};

if (params.response_mode === 'form_post') {
return formPost.call(this, out);
return formPost.call(this, params.redirect_uri, out);
}

@@ -575,7 +578,7 @@

this.assert(!claims.userinfo !== undefined ||
this.assert(claims.userinfo === undefined ||
_.isPlainObject(claims.userinfo), new errors.InvalidRequestError(
'claims.userinfo should be an object'));
this.assert(!claims.id_token !== undefined ||
this.assert(claims.id_token === undefined ||
_.isPlainObject(claims.id_token), new errors.InvalidRequestError(

@@ -582,0 +585,0 @@ 'claims.id_token should be an object'));

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

realm: provider.issuer,
}).merge(this.body).map((val, key) => `${key}="${val}"`).value().join(', ');
})
.merge(this.body)
.map((val, key) => `${key}="${val}"`)
.value()
.join(', ');

@@ -42,0 +46,0 @@ this.set('WWW-Authenticate', `Bearer ${wwwAuth}`);

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

shasum.update(accountId);
shasum.update('salt');
shasum.update(config.pairwiseSalt);

@@ -58,22 +58,30 @@ return shasum.digest('hex');

result() {
const include = _.chain(this.mask).pickBy((value) => {
if (value === null) {
return true;
}
const include = _.chain(this.mask)
.pickBy((value) => {
if (value === null) {
return true;
}
if (value.value !== undefined) {
return true;
}
if (!_.isPlainObject(value)) {
return false;
}
if (value.values !== undefined) {
return true;
}
if (value.value !== undefined) {
return true;
}
if (value.essential !== undefined) {
return true;
}
if (value.values !== undefined) {
return true;
}
return false;
}).keys().intersection(config.claimsSupported).value();
if (value.essential !== undefined) {
return true;
}
return false;
})
.keys()
.intersection(config.claimsSupported)
.value();
const claims = _.chain(this.available).pick(include).value();

@@ -80,0 +88,0 @@

@@ -72,6 +72,17 @@ 'use strict';

this.claimsSupported = _.chain(this.scopes).map(scope => _.keys(_.get(this.claims, scope, {})))
.union(_.chain(this.claims).pickBy(_.isNull).keys().value())
.flatten().sort().value();
if (this.subjectTypesSupported.indexOf('pairwise') !== -1 && !this.pairwiseSalt) {
const msg = 'pairwiseSalt must be configured when pairwise subjectType is to be supported';
throw new Error(msg);
}
this.claimsSupported = _.chain(this.scopes)
.map(scope => _.keys(_.get(this.claims, scope, {})))
.union(_.chain(this.claims)
.pickBy(_.isNull)
.keys()
.value())
.flatten()
.sort()
.value();
const grantTypesSupported = [];

@@ -78,0 +89,0 @@

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

subjectTypesSupported: ['public', 'pairwise'],
pairwiseSalt: '',
tokenEndpointAuthMethodsSupported: [

@@ -116,0 +117,0 @@ 'none',

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

<form method="post" action="${action}">
${formInputs}
${formInputs}
</form>

@@ -18,0 +18,0 @@ </body>

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

module.exports = function * checkDupes(next) {
const dupes = _.chain(this.oidc.params).pickBy(Array.isArray).keys().value();
const dupes = _.chain(this.oidc.params)
.pickBy(Array.isArray)
.keys()
.value();

@@ -10,0 +13,0 @@ // Validate: no dup params

@@ -0,1 +1,2 @@

/* eslint-disable newline-per-chained-call */
'use strict';

@@ -2,0 +3,0 @@

@@ -24,3 +24,3 @@ {

"eslint": "^2.8.0",
"eslint-config-airbnb-base": "^1.0.3",
"eslint-config-airbnb-base": "^3.0.1",
"eslint-plugin-import": "^1.5.0",

@@ -52,7 +52,7 @@ "istanbul": "^0.4.3",

"scripts": {
"coverage": "make test-cov",
"coverage": "make coverage",
"test": "make test",
"lint": "eslint lib example test --fix"
},
"version": "0.3.0",
"version": "0.3.1",
"files": [

@@ -59,0 +59,0 @@ "lib"

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