diff --git a/apps/demo/CHANGELOG.md b/apps/demo/CHANGELOG.md index b320d83..d6ca929 100644 --- a/apps/demo/CHANGELOG.md +++ b/apps/demo/CHANGELOG.md @@ -1,5 +1,12 @@ # @authhero/demo +## 0.5.3 + +### Patch Changes + +- Updated dependencies + - authhero@0.25.0 + ## 0.5.2 ### Patch Changes diff --git a/apps/demo/package.json b/apps/demo/package.json index 1599be7..135a745 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -1,7 +1,7 @@ { "name": "@authhero/demo", "private": true, - "version": "0.5.2", + "version": "0.5.3", "scripts": { "dev": "bun --watch src/bun.ts" }, @@ -10,7 +10,7 @@ "@hono/swagger-ui": "^0.5.0", "@hono/zod-openapi": "^0.18.3", "@peculiar/x509": "^1.12.3", - "authhero": "^0.24.0", + "authhero": "^0.25.0", "hono": "^4.6.13", "hono-openapi-middlewares": "^1.0.11", "kysely-bun-sqlite": "^0.3.2", diff --git a/packages/authhero/CHANGELOG.md b/packages/authhero/CHANGELOG.md index e722b49..a11d745 100644 --- a/packages/authhero/CHANGELOG.md +++ b/packages/authhero/CHANGELOG.md @@ -1,5 +1,11 @@ # authhero +## 0.25.0 + +### Minor Changes + +- update hook signature + ## 0.24.0 ### Minor Changes diff --git a/packages/authhero/package.json b/packages/authhero/package.json index 923d4bb..e193a03 100644 --- a/packages/authhero/package.json +++ b/packages/authhero/package.json @@ -1,6 +1,6 @@ { "name": "authhero", - "version": "0.24.0", + "version": "0.25.0", "files": [ "dist" ], diff --git a/packages/authhero/src/index.ts b/packages/authhero/src/index.ts index ca7499e..e349af3 100644 --- a/packages/authhero/src/index.ts +++ b/packages/authhero/src/index.ts @@ -8,6 +8,7 @@ import { addDataHooks } from "./hooks"; import { createX509Certificate } from "./helpers/encryption"; export * from "@authhero/adapter-interfaces"; +export * from "./types/Hooks"; export function init(config: AuthHeroConfig) { const app = new OpenAPIHono<{ Bindings: Bindings; Variables: Variables }>(); diff --git a/packages/authhero/src/types/Hooks.ts b/packages/authhero/src/types/Hooks.ts index efd7130..ec37319 100644 --- a/packages/authhero/src/types/Hooks.ts +++ b/packages/authhero/src/types/Hooks.ts @@ -19,5 +19,5 @@ export type OnExecuteCredentialsExchangeAPI = { export type OnExecuteCredentialsExchange = ( event: OnExecuteCredentialsExchangeEvent, - api: OnExecuteCredentialsExchangeAPI, + access: OnExecuteCredentialsExchangeAPI, ) => Promise; diff --git a/packages/authhero/test/hooks/credentials-exchange.spec.ts b/packages/authhero/test/hooks/credentials-exchange.spec.ts index cc7bc71..8993a8c 100644 --- a/packages/authhero/test/hooks/credentials-exchange.spec.ts +++ b/packages/authhero/test/hooks/credentials-exchange.spec.ts @@ -3,7 +3,7 @@ import { testClient } from "hono/testing"; import { getTestServer } from "../helpers/test-server"; import { parseJWT } from "oslo/jwt"; import { - OnExecuteCredentialsExchangeAPI, + OnExecuteCredentialsExchangeAccess, OnExecuteCredentialsExchangeEvent, } from "../../src/types/Hooks"; @@ -15,7 +15,7 @@ describe("client-credentials-hooks", () => { env.hooks = { onExecuteCredentialsExchange: async ( event: OnExecuteCredentialsExchangeEvent, - api: OnExecuteCredentialsExchangeAPI, + api: OnExecuteCredentialsExchangeAccess, ) => { if (event.client.id === "clientId") { api.accessToken.setCustomClaim("foo", "bar");