fastify-openid-auth
Advanced tools
Comparing version 8.0.2 to 9.0.0
@@ -7,11 +7,9 @@ import { openIDJWTVerify } from './verify.js'; | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
const { id_token, session_state } = tokenset; | ||
if (id_token !== undefined) { | ||
request.log.trace('OpenID logout redirect'); | ||
return await reply.redirect(client.endSessionUrl({ | ||
id_token_hint: id_token, | ||
state: session_state, | ||
...parameters | ||
})); | ||
} | ||
const { id_token: id_token_hint, session_state: state } = tokenset; | ||
request.log.trace('OpenID logout redirect'); | ||
return await reply.redirect(client.endSessionUrl({ | ||
id_token_hint, | ||
state, | ||
...parameters | ||
})); | ||
} | ||
@@ -18,0 +16,0 @@ // #endregion |
@@ -1,2 +0,2 @@ | ||
import { type FastifyPluginAsync, type RouteHandlerMethod } from 'fastify'; | ||
import { type FastifyPluginAsync, type FastifyPluginOptions, type RouteHandlerMethod } from 'fastify'; | ||
import { type Client } from 'openid-client'; | ||
@@ -7,3 +7,3 @@ import { type OpenIDLoginHandlerOptions } from './login.js'; | ||
import { type OpenIDVerifyHandlerOptions } from './verify.js'; | ||
export interface FastifyOpenIDAuthPluginOptions { | ||
export type FastifyOpenIDAuthPluginOptions = FastifyPluginOptions & { | ||
decorator: string | symbol; | ||
@@ -15,3 +15,3 @@ client: Client; | ||
logout: OpenIDLogoutHandlerOptions; | ||
} | ||
}; | ||
export interface OpenIDAuthHandlers { | ||
@@ -24,2 +24,3 @@ login: RouteHandlerMethod; | ||
export declare const openIDAuthPlugin: FastifyPluginAsync<FastifyOpenIDAuthPluginOptions>; | ||
export default openIDAuthPlugin; | ||
declare const _default: FastifyPluginAsync<FastifyOpenIDAuthPluginOptions>; | ||
export default _default; |
@@ -6,3 +6,3 @@ import fp from 'fastify-plugin'; | ||
import { openIDVerifyHandlerFactory } from './verify.js'; | ||
export const openIDAuthPlugin = fp(async (fastify, options) => { | ||
export const openIDAuthPlugin = async (fastify, options) => { | ||
const { decorator, client, login, refresh, verify, logout } = options; | ||
@@ -17,3 +17,4 @@ const openIDAuthHandlers = { | ||
fastify.decorate(decorator, openIDAuthHandlers); | ||
}, { | ||
}; | ||
export default fp(openIDAuthPlugin, { | ||
fastify: '4.x', | ||
@@ -25,3 +26,2 @@ name: 'fastify-openid-auth', | ||
}); | ||
export default openIDAuthPlugin; | ||
//# sourceMappingURL=plugin.js.map |
{ | ||
"name": "fastify-openid-auth", | ||
"version": "8.0.2", | ||
"version": "9.0.0", | ||
"description": "Fastify auth plugin for openid-client", | ||
@@ -41,23 +41,23 @@ "type": "module", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^6", | ||
"@semantic-release/commit-analyzer": "^10", | ||
"@semantic-release/git": "^10", | ||
"@semantic-release/github": "^9", | ||
"@semantic-release/npm": "^10", | ||
"@semantic-release/release-notes-generator": "^11", | ||
"@tsconfig/node20": "^1", | ||
"@types/node": "^20", | ||
"eslint": "^8", | ||
"eslint-config-standard-with-typescript": "^36", | ||
"fastify": "^4", | ||
"semantic-release": "^21", | ||
"shx": "^0", | ||
"typescript": "^5" | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/commit-analyzer": "^11.1.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", | ||
"@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", | ||
"shx": "^0.3.4", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@fastify/error": "^3", | ||
"fastify-plugin": "^4", | ||
"jose": "^4", | ||
"openid-client": "^5" | ||
"@fastify/error": "^3.4.1", | ||
"fastify-plugin": "^4.5.1", | ||
"jose": "^4.15.4", | ||
"openid-client": "^5.6.4" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
33739
315
Updated@fastify/error@^3.4.1
Updatedfastify-plugin@^4.5.1
Updatedjose@^4.15.4
Updatedopenid-client@^5.6.4