New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastify-openid-auth

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-openid-auth - npm Package Compare versions

Comparing version 9.0.0 to 10.0.0

dist/fastify-openid-auth-10.0.0.tgz

4

dist/login.d.ts
import createError from '@fastify/error';
import { type RouteHandlerMethod } from 'fastify';
import type { RouteHandlerMethod } from 'fastify';
import { type AuthorizationParameters, type CallbackExtras, type Client } from 'openid-client';
import { type OpenIDWriteTokens } from './types.js';
import type { OpenIDWriteTokens } from './types.js';
import { type OpenIDVerifyOptions } from './verify.js';

@@ -6,0 +6,0 @@ declare module 'fastify' {

@@ -30,8 +30,6 @@ /* eslint-disable @typescript-eslint/naming-convention */

}
else if (supportedMethods.includes('plain')) {
if (supportedMethods.includes('plain')) {
return 'plain';
}
else {
throw new SupportedMethodError();
}
throw new SupportedMethodError();
};

@@ -102,5 +100,3 @@ const resolveSessionKey = (issuer) => {

const tokenset = await client.callback(redirect_uri, callbackParams, callbackChecks, extras);
const verified = verify !== undefined
? await openIDJWTVerify(tokenset, verify)
: undefined;
const verified = verify !== undefined ? await openIDJWTVerify(tokenset, verify) : undefined;
request.log.trace('OpenID login callback');

@@ -107,0 +103,0 @@ return await write?.call(this, request, reply, tokenset, verified);

@@ -1,4 +0,4 @@

import { type RouteHandlerMethod } from 'fastify';
import { type Client, type EndSessionParameters } from 'openid-client';
import { type OpenIDReadTokens, type OpenIDWriteTokens } from './types.js';
import type { RouteHandlerMethod } from 'fastify';
import type { Client, EndSessionParameters } from 'openid-client';
import type { OpenIDReadTokens, OpenIDWriteTokens } from './types.js';
import { type OpenIDVerifyOptions } from './verify.js';

@@ -5,0 +5,0 @@ export interface OpenIDLogoutHandlerOptions {

@@ -17,5 +17,3 @@ import { openIDJWTVerify } from './verify.js';

// #region authentication response
const verified = verify !== undefined
? await openIDJWTVerify(tokenset, verify)
: undefined;
const verified = verify !== undefined ? await openIDJWTVerify(tokenset, verify) : undefined;
request.log.trace('OpenID logout callback');

@@ -22,0 +20,0 @@ return await write?.call(this, request, reply, tokenset, verified);

@@ -1,3 +0,3 @@

import { type FastifyPluginAsync, type FastifyPluginOptions, type RouteHandlerMethod } from 'fastify';
import { type Client } from 'openid-client';
import type { FastifyPluginAsync, FastifyPluginOptions, RouteHandlerMethod } from 'fastify';
import type { Client } from 'openid-client';
import { type OpenIDLoginHandlerOptions } from './login.js';

@@ -4,0 +4,0 @@ import { type OpenIDLogoutHandlerOptions } from './logout.js';

@@ -18,3 +18,3 @@ import fp from 'fastify-plugin';

export default fp(openIDAuthPlugin, {
fastify: '4.x',
fastify: '5.x',
name: 'fastify-openid-auth',

@@ -21,0 +21,0 @@ decorators: {

@@ -1,4 +0,4 @@

import { type RouteHandlerMethod } from 'fastify';
import type { RouteHandlerMethod } from 'fastify';
import { type Client, type RefreshExtras } from 'openid-client';
import { type OpenIDReadTokens, type OpenIDWriteTokens } from './types.js';
import type { OpenIDReadTokens, OpenIDWriteTokens } from './types.js';
import { type OpenIDVerifyOptions } from './verify.js';

@@ -5,0 +5,0 @@ export interface OpenIDRefreshHandlerOptions {

@@ -1,4 +0,4 @@

import { type FastifyInstance, type FastifyReply, type FastifyRequest } from 'fastify';
import { type JWTVerifyResult } from 'jose';
import { type TokenSetParameters } from 'openid-client';
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import type { JWTVerifyResult } from 'jose';
import type { TokenSetParameters } from 'openid-client';
export type OpenIDTokens = keyof Pick<TokenSetParameters, 'id_token' | 'access_token' | 'refresh_token'>;

@@ -5,0 +5,0 @@ export type OpenIDJWTVerified = {

@@ -1,5 +0,5 @@

import { type RouteHandlerMethod } from 'fastify';
import type { RouteHandlerMethod } from 'fastify';
import { type JWTVerifyGetKey, type JWTVerifyOptions, type KeyLike } from 'jose';
import { type TokenSetParameters } from 'openid-client';
import { type OpenIDJWTVerified, type OpenIDReadTokens, type OpenIDTokens, type OpenIDWriteTokens } from './types.js';
import type { TokenSetParameters } from 'openid-client';
import type { OpenIDJWTVerified, OpenIDReadTokens, OpenIDTokens, OpenIDWriteTokens } from './types.js';
export interface OpenIDVerifyOptions {

@@ -6,0 +6,0 @@ options?: JWTVerifyOptions;

{
"name": "fastify-openid-auth",
"version": "9.0.0",
"version": "10.0.0",
"description": "Fastify auth plugin for openid-client",

@@ -20,3 +20,4 @@ "type": "module",

"clean": "shx rm -rf dist",
"lint": "eslint src/**/*.ts",
"check": "biome check",
"lint": "biome lint",
"semantic-release": "semantic-release"

@@ -42,23 +43,22 @@ },

"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^11.1.0",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.2",
"@semantic-release/release-notes-generator": "^12.1.0",
"@semantic-release/github": "^11.0.0",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.1",
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.11.19",
"eslint": "^8.56.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"fastify": "^4.26.1",
"semantic-release": "^23.0.2",
"fastify": "^5.0.0",
"semantic-release": "^24.1.2",
"shx": "^0.3.4",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
},
"dependencies": {
"@fastify/error": "^3.4.1",
"fastify-plugin": "^4.5.1",
"jose": "^4.15.4",
"openid-client": "^5.6.4"
"@fastify/error": "^4.0.0",
"fastify-plugin": "^5.0.1",
"jose": "^4.15.9",
"openid-client": "^5.7.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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