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

passport-curity

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-curity - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

package.json
{
"name": "passport-curity",
"version": "1.1.0",
"version": "1.1.1",
"description": "Curity authentication strategy for Passport.js",

@@ -27,8 +27,9 @@ "homepage": "https://github.com/curityio/passport-curity",

"dependencies": {
"openid-client": "^3.14.2"
"openid-client": "^5.2.1"
},
"devDependencies": {
"ava": "^3.8.1",
"ava": "^5.0.1",
"readable-mock-req": "^0.2.2",
"sinon": "^9.0.2"
"sinon": "^14.0.2",
"base64url": "^3.0.1"
},

@@ -35,0 +36,0 @@ "ava": {

@@ -85,3 +85,17 @@ /*

test.cb('Should fallback to calling userinfo when ID token not present and option set', t => {
async function promisifyStrategyAndAuthenticate(client, t, req) {
return new Promise((resolve) => {
const strategy = new Strategy({ client, fallbackToUserInfoRequest: true }, (accessToken, refreshToken, profile, callback) => {
t.true(client.userinfo.called, "Client should call userinfo endpoint");
callback(null, profile);
resolve();
});
strategy.success = () => {};
strategy.authenticate(req);
})
}
test('Should fallback to calling userinfo when ID token not present and option set', async t => {
const client = getClient();

@@ -91,9 +105,2 @@ sinon.stub(client, 'callback').callsFake(async () => {});

const strategy = new Strategy({ client, fallbackToUserInfoRequest: true }, (accessToken, refreshToken, profile, callback) => {
t.true(client.userinfo.called, "Client should call userinfo endpoint");
callback(null, profile);
});
strategy.success = () => { t.end(null) };
const req = new MockRequest('GET', '/callback?code=somecode');

@@ -106,3 +113,3 @@ req.session = {

strategy.authenticate(req);
await promisifyStrategyAndAuthenticate(client, t, req)
});
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