@lindorm/aegis 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +142 -180
  3. package/__tests__/jwe-interop.test.ts +3 -2
  4. package/__tests__/jwt-interop.test.ts +4 -7
  5. package/dist/classes/Aegis.d.ts +5 -5
  6. package/dist/classes/Aegis.d.ts.map +1 -1
  7. package/dist/classes/Aegis.js +35 -39
  8. package/dist/classes/Aegis.js.map +1 -1
  9. package/dist/classes/JweKit.d.ts +2 -2
  10. package/dist/classes/JweKit.d.ts.map +1 -1
  11. package/dist/classes/JweKit.js +47 -51
  12. package/dist/classes/JweKit.js.map +1 -1
  13. package/dist/classes/JwsKit.d.ts +2 -2
  14. package/dist/classes/JwsKit.d.ts.map +1 -1
  15. package/dist/classes/JwsKit.js +32 -36
  16. package/dist/classes/JwsKit.js.map +1 -1
  17. package/dist/classes/JwtKit.d.ts +3 -3
  18. package/dist/classes/JwtKit.d.ts.map +1 -1
  19. package/dist/classes/JwtKit.js +50 -54
  20. package/dist/classes/JwtKit.js.map +1 -1
  21. package/dist/classes/SignatureKit.d.ts +2 -2
  22. package/dist/classes/SignatureKit.d.ts.map +1 -1
  23. package/dist/classes/SignatureKit.js +13 -17
  24. package/dist/classes/SignatureKit.js.map +1 -1
  25. package/dist/classes/index.d.ts +5 -5
  26. package/dist/classes/index.d.ts.map +1 -1
  27. package/dist/classes/index.js +5 -21
  28. package/dist/classes/index.js.map +1 -1
  29. package/dist/constants/token-type.js +2 -5
  30. package/dist/constants/token-type.js.map +1 -1
  31. package/dist/errors/AegisError.js +2 -6
  32. package/dist/errors/AegisError.js.map +1 -1
  33. package/dist/errors/JweError.js +2 -6
  34. package/dist/errors/JweError.js.map +1 -1
  35. package/dist/errors/JwsError.js +2 -6
  36. package/dist/errors/JwsError.js.map +1 -1
  37. package/dist/errors/JwtError.js +2 -6
  38. package/dist/errors/JwtError.js.map +1 -1
  39. package/dist/errors/index.d.ts +4 -4
  40. package/dist/errors/index.d.ts.map +1 -1
  41. package/dist/errors/index.js +4 -20
  42. package/dist/errors/index.js.map +1 -1
  43. package/dist/guards/index.d.ts +2 -2
  44. package/dist/guards/index.d.ts.map +1 -1
  45. package/dist/guards/index.js +2 -18
  46. package/dist/guards/index.js.map +1 -1
  47. package/dist/guards/is-parsed-jws.d.ts +1 -1
  48. package/dist/guards/is-parsed-jws.d.ts.map +1 -1
  49. package/dist/guards/is-parsed-jws.js +1 -5
  50. package/dist/guards/is-parsed-jws.js.map +1 -1
  51. package/dist/guards/is-parsed-jwt.d.ts +1 -1
  52. package/dist/guards/is-parsed-jwt.d.ts.map +1 -1
  53. package/dist/guards/is-parsed-jwt.js +1 -5
  54. package/dist/guards/is-parsed-jwt.js.map +1 -1
  55. package/dist/index.d.ts +6 -7
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +5 -22
  58. package/dist/index.js.map +1 -1
  59. package/dist/interfaces/Aegis.d.ts +3 -3
  60. package/dist/interfaces/Aegis.d.ts.map +1 -1
  61. package/dist/interfaces/Aegis.js +1 -2
  62. package/dist/interfaces/JweKit.d.ts +1 -1
  63. package/dist/interfaces/JweKit.d.ts.map +1 -1
  64. package/dist/interfaces/JweKit.js +1 -2
  65. package/dist/interfaces/JwsKit.d.ts +1 -1
  66. package/dist/interfaces/JwsKit.d.ts.map +1 -1
  67. package/dist/interfaces/JwsKit.js +1 -2
  68. package/dist/interfaces/JwtKit.d.ts +2 -2
  69. package/dist/interfaces/JwtKit.d.ts.map +1 -1
  70. package/dist/interfaces/JwtKit.js +1 -2
  71. package/dist/interfaces/index.d.ts +4 -4
  72. package/dist/interfaces/index.d.ts.map +1 -1
  73. package/dist/interfaces/index.js +4 -20
  74. package/dist/interfaces/index.js.map +1 -1
  75. package/dist/internal/constants/aegis-profile-keys.js +1 -4
  76. package/dist/internal/constants/aegis-profile-keys.js.map +1 -1
  77. package/dist/internal/constants/format.js +1 -4
  78. package/dist/internal/constants/format.js.map +1 -1
  79. package/dist/internal/constants/header.js +13 -16
  80. package/dist/internal/constants/header.js.map +1 -1
  81. package/dist/internal/utils/compute-jwk-thumbprint.js +5 -9
  82. package/dist/internal/utils/compute-jwk-thumbprint.js.map +1 -1
  83. package/dist/internal/utils/compute-typ-header.d.ts +2 -2
  84. package/dist/internal/utils/compute-typ-header.d.ts.map +1 -1
  85. package/dist/internal/utils/compute-typ-header.js +6 -12
  86. package/dist/internal/utils/compute-typ-header.js.map +1 -1
  87. package/dist/internal/utils/create-hash.d.ts +1 -1
  88. package/dist/internal/utils/create-hash.d.ts.map +1 -1
  89. package/dist/internal/utils/create-hash.js +10 -17
  90. package/dist/internal/utils/create-hash.js.map +1 -1
  91. package/dist/internal/utils/extract-aegis-profile.d.ts +2 -2
  92. package/dist/internal/utils/extract-aegis-profile.d.ts.map +1 -1
  93. package/dist/internal/utils/extract-aegis-profile.js +6 -10
  94. package/dist/internal/utils/extract-aegis-profile.js.map +1 -1
  95. package/dist/internal/utils/extract-claims.d.ts +7 -7
  96. package/dist/internal/utils/extract-claims.d.ts.map +1 -1
  97. package/dist/internal/utils/extract-claims.js +47 -51
  98. package/dist/internal/utils/extract-claims.js.map +1 -1
  99. package/dist/internal/utils/extract-token-delegation.d.ts +2 -2
  100. package/dist/internal/utils/extract-token-delegation.d.ts.map +1 -1
  101. package/dist/internal/utils/extract-token-delegation.js +3 -7
  102. package/dist/internal/utils/extract-token-delegation.js.map +1 -1
  103. package/dist/internal/utils/generate-token-id.js +4 -8
  104. package/dist/internal/utils/generate-token-id.js.map +1 -1
  105. package/dist/internal/utils/jose-header.d.ts +1 -1
  106. package/dist/internal/utils/jose-header.d.ts.map +1 -1
  107. package/dist/internal/utils/jose-header.js +14 -19
  108. package/dist/internal/utils/jose-header.js.map +1 -1
  109. package/dist/internal/utils/jose-signature.d.ts +1 -1
  110. package/dist/internal/utils/jose-signature.d.ts.map +1 -1
  111. package/dist/internal/utils/jose-signature.js +7 -12
  112. package/dist/internal/utils/jose-signature.js.map +1 -1
  113. package/dist/internal/utils/jwt-payload.d.ts +3 -3
  114. package/dist/internal/utils/jwt-payload.d.ts.map +1 -1
  115. package/dist/internal/utils/jwt-payload.js +79 -86
  116. package/dist/internal/utils/jwt-payload.js.map +1 -1
  117. package/dist/internal/utils/jwt-validate.d.ts +2 -2
  118. package/dist/internal/utils/jwt-validate.d.ts.map +1 -1
  119. package/dist/internal/utils/jwt-validate.js +13 -17
  120. package/dist/internal/utils/jwt-validate.js.map +1 -1
  121. package/dist/internal/utils/jwt-verify.d.ts +3 -3
  122. package/dist/internal/utils/jwt-verify.d.ts.map +1 -1
  123. package/dist/internal/utils/jwt-verify.js +18 -22
  124. package/dist/internal/utils/jwt-verify.js.map +1 -1
  125. package/dist/internal/utils/parse-introspection.d.ts +2 -2
  126. package/dist/internal/utils/parse-introspection.d.ts.map +1 -1
  127. package/dist/internal/utils/parse-introspection.js +12 -16
  128. package/dist/internal/utils/parse-introspection.js.map +1 -1
  129. package/dist/internal/utils/parse-userinfo.d.ts +2 -2
  130. package/dist/internal/utils/parse-userinfo.d.ts.map +1 -1
  131. package/dist/internal/utils/parse-userinfo.js +10 -14
  132. package/dist/internal/utils/parse-userinfo.js.map +1 -1
  133. package/dist/internal/utils/resolve-cert-binding.d.ts +2 -2
  134. package/dist/internal/utils/resolve-cert-binding.d.ts.map +1 -1
  135. package/dist/internal/utils/resolve-cert-binding.js +3 -7
  136. package/dist/internal/utils/resolve-cert-binding.js.map +1 -1
  137. package/dist/internal/utils/token-header.d.ts +1 -1
  138. package/dist/internal/utils/token-header.d.ts.map +1 -1
  139. package/dist/internal/utils/token-header.js +15 -20
  140. package/dist/internal/utils/token-header.js.map +1 -1
  141. package/dist/internal/utils/validate-actor.d.ts +1 -1
  142. package/dist/internal/utils/validate-actor.d.ts.map +1 -1
  143. package/dist/internal/utils/validate-actor.js +1 -5
  144. package/dist/internal/utils/validate-actor.js.map +1 -1
  145. package/dist/internal/utils/validate-crit.js +1 -5
  146. package/dist/internal/utils/validate-crit.js.map +1 -1
  147. package/dist/internal/utils/validate.d.ts +1 -1
  148. package/dist/internal/utils/validate.d.ts.map +1 -1
  149. package/dist/internal/utils/validate.js +6 -10
  150. package/dist/internal/utils/validate.js.map +1 -1
  151. package/dist/internal/utils/verify-cert-binding.d.ts +3 -3
  152. package/dist/internal/utils/verify-cert-binding.d.ts.map +1 -1
  153. package/dist/internal/utils/verify-cert-binding.js +4 -8
  154. package/dist/internal/utils/verify-cert-binding.js.map +1 -1
  155. package/dist/internal/utils/verify-dpop-proof.d.ts +1 -1
  156. package/dist/internal/utils/verify-dpop-proof.d.ts.map +1 -1
  157. package/dist/internal/utils/verify-dpop-proof.js +23 -27
  158. package/dist/internal/utils/verify-dpop-proof.js.map +1 -1
  159. package/dist/mocks/create-mock-aegis.d.ts +3 -3
  160. package/dist/mocks/create-mock-aegis.d.ts.map +1 -1
  161. package/dist/mocks/create-mock-aegis.js +20 -20
  162. package/dist/mocks/create-mock-aegis.js.map +1 -1
  163. package/dist/mocks/jest.d.ts +5 -0
  164. package/dist/mocks/jest.d.ts.map +1 -0
  165. package/dist/mocks/jest.js +4 -0
  166. package/dist/mocks/jest.js.map +1 -0
  167. package/dist/mocks/vitest.d.ts +6 -0
  168. package/dist/mocks/vitest.d.ts.map +1 -0
  169. package/dist/mocks/vitest.js +5 -0
  170. package/dist/mocks/vitest.js.map +1 -0
  171. package/dist/types/aegis.d.ts +5 -5
  172. package/dist/types/aegis.d.ts.map +1 -1
  173. package/dist/types/aegis.js +1 -2
  174. package/dist/types/claims/act-claim.js +1 -2
  175. package/dist/types/claims/aegis-introspection.d.ts +6 -6
  176. package/dist/types/claims/aegis-introspection.d.ts.map +1 -1
  177. package/dist/types/claims/aegis-introspection.js +1 -2
  178. package/dist/types/claims/aegis-profile.js +1 -2
  179. package/dist/types/claims/aegis-userinfo.d.ts +1 -1
  180. package/dist/types/claims/aegis-userinfo.d.ts.map +1 -1
  181. package/dist/types/claims/aegis-userinfo.js +1 -2
  182. package/dist/types/claims/confirmation-claim.d.ts +1 -1
  183. package/dist/types/claims/confirmation-claim.d.ts.map +1 -1
  184. package/dist/types/claims/confirmation-claim.js +1 -2
  185. package/dist/types/claims/delegation-claims.d.ts +1 -1
  186. package/dist/types/claims/delegation-claims.d.ts.map +1 -1
  187. package/dist/types/claims/delegation-claims.js +1 -2
  188. package/dist/types/claims/index.d.ts +12 -12
  189. package/dist/types/claims/index.d.ts.map +1 -1
  190. package/dist/types/claims/index.js +12 -28
  191. package/dist/types/claims/index.js.map +1 -1
  192. package/dist/types/claims/jwt/act-claim-wire.js +1 -2
  193. package/dist/types/claims/jwt/confirmation-claim-wire.d.ts +1 -1
  194. package/dist/types/claims/jwt/confirmation-claim-wire.d.ts.map +1 -1
  195. package/dist/types/claims/jwt/confirmation-claim-wire.js +1 -2
  196. package/dist/types/claims/jwt/delegation-claims-wire.d.ts +1 -1
  197. package/dist/types/claims/jwt/delegation-claims-wire.d.ts.map +1 -1
  198. package/dist/types/claims/jwt/delegation-claims-wire.js +1 -2
  199. package/dist/types/claims/jwt/index.d.ts +9 -9
  200. package/dist/types/claims/jwt/index.d.ts.map +1 -1
  201. package/dist/types/claims/jwt/index.js +9 -25
  202. package/dist/types/claims/jwt/index.js.map +1 -1
  203. package/dist/types/claims/jwt/jwt-claims.d.ts +6 -6
  204. package/dist/types/claims/jwt/jwt-claims.d.ts.map +1 -1
  205. package/dist/types/claims/jwt/jwt-claims.js +1 -2
  206. package/dist/types/claims/jwt/lindorm-claims-wire.d.ts +2 -2
  207. package/dist/types/claims/jwt/lindorm-claims-wire.d.ts.map +1 -1
  208. package/dist/types/claims/jwt/lindorm-claims-wire.js +1 -2
  209. package/dist/types/claims/jwt/oauth-claims-wire.js +1 -2
  210. package/dist/types/claims/jwt/oidc-claims-wire.js +1 -2
  211. package/dist/types/claims/jwt/pop-claims-wire.d.ts +1 -1
  212. package/dist/types/claims/jwt/pop-claims-wire.d.ts.map +1 -1
  213. package/dist/types/claims/jwt/pop-claims-wire.js +1 -2
  214. package/dist/types/claims/jwt/std-claims-wire.js +1 -2
  215. package/dist/types/claims/lindorm-claims.d.ts +1 -1
  216. package/dist/types/claims/lindorm-claims.d.ts.map +1 -1
  217. package/dist/types/claims/lindorm-claims.js +1 -2
  218. package/dist/types/claims/oauth-claims.js +1 -2
  219. package/dist/types/claims/oidc-claims.js +1 -2
  220. package/dist/types/claims/pop-claims.d.ts +1 -1
  221. package/dist/types/claims/pop-claims.d.ts.map +1 -1
  222. package/dist/types/claims/pop-claims.js +1 -2
  223. package/dist/types/claims/std-claims.js +1 -2
  224. package/dist/types/header.d.ts +3 -3
  225. package/dist/types/header.d.ts.map +1 -1
  226. package/dist/types/header.js +1 -2
  227. package/dist/types/header.js.map +1 -1
  228. package/dist/types/index.d.ts +9 -9
  229. package/dist/types/index.d.ts.map +1 -1
  230. package/dist/types/index.js +9 -25
  231. package/dist/types/index.js.map +1 -1
  232. package/dist/types/jwe/index.d.ts +4 -4
  233. package/dist/types/jwe/index.d.ts.map +1 -1
  234. package/dist/types/jwe/index.js +4 -20
  235. package/dist/types/jwe/index.js.map +1 -1
  236. package/dist/types/jwe/jwe-decode.d.ts +1 -1
  237. package/dist/types/jwe/jwe-decode.d.ts.map +1 -1
  238. package/dist/types/jwe/jwe-decode.js +1 -2
  239. package/dist/types/jwe/jwe-decrypt.d.ts +3 -3
  240. package/dist/types/jwe/jwe-decrypt.d.ts.map +1 -1
  241. package/dist/types/jwe/jwe-decrypt.js +1 -2
  242. package/dist/types/jwe/jwe-encrypt.d.ts +2 -2
  243. package/dist/types/jwe/jwe-encrypt.d.ts.map +1 -1
  244. package/dist/types/jwe/jwe-encrypt.js +1 -2
  245. package/dist/types/jwe/jwe-kit.d.ts +1 -1
  246. package/dist/types/jwe/jwe-kit.d.ts.map +1 -1
  247. package/dist/types/jwe/jwe-kit.js +1 -2
  248. package/dist/types/jws/index.d.ts +4 -4
  249. package/dist/types/jws/index.d.ts.map +1 -1
  250. package/dist/types/jws/index.js +4 -20
  251. package/dist/types/jws/index.js.map +1 -1
  252. package/dist/types/jws/jws-decode.d.ts +1 -1
  253. package/dist/types/jws/jws-decode.d.ts.map +1 -1
  254. package/dist/types/jws/jws-decode.js +1 -2
  255. package/dist/types/jws/jws-kit.d.ts +1 -1
  256. package/dist/types/jws/jws-kit.d.ts.map +1 -1
  257. package/dist/types/jws/jws-kit.js +1 -2
  258. package/dist/types/jws/jws-parse.d.ts +3 -3
  259. package/dist/types/jws/jws-parse.d.ts.map +1 -1
  260. package/dist/types/jws/jws-parse.js +1 -2
  261. package/dist/types/jws/jws-sign.d.ts +2 -2
  262. package/dist/types/jws/jws-sign.d.ts.map +1 -1
  263. package/dist/types/jws/jws-sign.js +1 -2
  264. package/dist/types/jwt/index.d.ts +9 -9
  265. package/dist/types/jwt/index.d.ts.map +1 -1
  266. package/dist/types/jwt/index.js +9 -25
  267. package/dist/types/jwt/index.js.map +1 -1
  268. package/dist/types/jwt/jwt-claim-matchers.d.ts +1 -1
  269. package/dist/types/jwt/jwt-claim-matchers.d.ts.map +1 -1
  270. package/dist/types/jwt/jwt-claim-matchers.js +1 -2
  271. package/dist/types/jwt/jwt-decode.d.ts +3 -3
  272. package/dist/types/jwt/jwt-decode.d.ts.map +1 -1
  273. package/dist/types/jwt/jwt-decode.js +1 -2
  274. package/dist/types/jwt/jwt-delegation.d.ts +1 -1
  275. package/dist/types/jwt/jwt-delegation.d.ts.map +1 -1
  276. package/dist/types/jwt/jwt-delegation.js +1 -2
  277. package/dist/types/jwt/jwt-dpop.js +1 -2
  278. package/dist/types/jwt/jwt-kit.d.ts +1 -1
  279. package/dist/types/jwt/jwt-kit.d.ts.map +1 -1
  280. package/dist/types/jwt/jwt-kit.js +1 -2
  281. package/dist/types/jwt/jwt-parse.d.ts +7 -7
  282. package/dist/types/jwt/jwt-parse.d.ts.map +1 -1
  283. package/dist/types/jwt/jwt-parse.js +1 -2
  284. package/dist/types/jwt/jwt-sign.d.ts +4 -4
  285. package/dist/types/jwt/jwt-sign.d.ts.map +1 -1
  286. package/dist/types/jwt/jwt-sign.js +1 -2
  287. package/dist/types/jwt/jwt-validate.d.ts +3 -3
  288. package/dist/types/jwt/jwt-validate.d.ts.map +1 -1
  289. package/dist/types/jwt/jwt-validate.js +1 -2
  290. package/dist/types/jwt/jwt-verify.d.ts +2 -2
  291. package/dist/types/jwt/jwt-verify.d.ts.map +1 -1
  292. package/dist/types/jwt/jwt-verify.js +1 -2
  293. package/dist/types/kit.d.ts +3 -3
  294. package/dist/types/kit.d.ts.map +1 -1
  295. package/dist/types/kit.js +1 -2
  296. package/dist/types/level-of-assurance.js +1 -2
  297. package/dist/types/signature-kit.d.ts +2 -2
  298. package/dist/types/signature-kit.d.ts.map +1 -1
  299. package/dist/types/signature-kit.js +1 -2
  300. package/package.json +33 -33
  301. package/vitest.config.mjs +6 -0
  302. package/__tests__/__mocks__/cbor.ts +0 -17
  303. package/dist/mocks/index.d.ts +0 -2
  304. package/dist/mocks/index.d.ts.map +0 -1
  305. package/dist/mocks/index.js +0 -6
  306. package/dist/mocks/index.js.map +0 -1
  307. package/jest.config.interop.mjs +0 -27
  308. package/tsconfig.interop.json +0 -9
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.7.0](https://github.com/lindorm-io/monorepo/compare/@lindorm/aegis@0.6.0...@lindorm/aegis@0.7.0) (2026-05-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **aegis:** drop createRequire interop workaround in jwt-interop test ([492e3df](https://github.com/lindorm-io/monorepo/commit/492e3dff29971a3958b0628ce5465195f8a8cfe5))
11
+ - widen @lindorm/\* peer ranges to unbounded >= ([f192b59](https://github.com/lindorm-io/monorepo/commit/f192b59107bf1f276d296837f40fa97765d9d2ba))
12
+
13
+ ### Features
14
+
15
+ - migrate 20 packages from jest to vitest ([d8bfda8](https://github.com/lindorm-io/monorepo/commit/d8bfda8854dc1cb9537ba0b3e47ec4e4c7bded08))
16
+
6
17
  # [0.6.0](https://github.com/lindorm-io/monorepo/compare/@lindorm/aegis@0.5.0...@lindorm/aegis@0.6.0) (2026-04-19)
7
18
 
8
19
  ### Features
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lindorm/aegis
2
2
 
3
- Token operations for JWT, JWE, JWS, CWT (CBOR Web Token), CWS (COSE Sign1), and CWE (COSE Encrypt).
3
+ JOSE token operations for JWT, JWS, and JWE backed by an Amphora key store.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,256 +8,186 @@ Token operations for JWT, JWE, JWS, CWT (CBOR Web Token), CWS (COSE Sign1), and
8
8
  npm install @lindorm/aegis
9
9
  ```
10
10
 
11
- ## Overview
11
+ This package is **ESM-only**. All examples use `import`; `require()` is not supported.
12
+
13
+ The `Aegis` class requires `@lindorm/amphora` (key store) and `@lindorm/logger` (logger) instances at construction time:
14
+
15
+ ```bash
16
+ npm install @lindorm/amphora @lindorm/logger
17
+ ```
12
18
 
13
- Aegis provides two usage patterns:
19
+ ## Overview
14
20
 
15
- - **Aegis class** async wrapper that resolves keys from an `IAmphora` key store before delegating to Kit classes.
16
- - **Kit classes** (`JwtKit`, `CwtKit`, `CwsKit`, etc.) — synchronous, single-key operations. You supply an `IKryptos` key directly.
21
+ Aegis exposes two layers:
17
22
 
18
- The Aegis class methods are **async** because they perform key lookups. All Kit class methods are **synchronous**.
23
+ - **`Aegis`** async façade that resolves keys from an `IAmphora` key store and delegates to the kit classes. Use this when you want JWT/JWS/JWE operations driven by a managed key store with `kid`-based lookup.
24
+ - **Kit classes** (`JwtKit`, `JwsKit`, `JweKit`, `SignatureKit`) — synchronous, single-key primitives. You supply an `IKryptos` key directly. Use these when you already have the key in hand and don't need the Amphora layer.
19
25
 
20
- ## Aegis Class
26
+ The `Aegis` instance methods are async because they perform key lookups. All kit instance methods are synchronous.
21
27
 
22
- Async wrapper that resolves keys from an `IAmphora` key store. All operations are async.
28
+ ## Aegis
23
29
 
24
30
  ```typescript
25
31
  import { Aegis } from "@lindorm/aegis";
26
32
 
27
33
  const aegis = new Aegis({
28
- amphora,
29
- logger,
30
- issuer: "https://example.com",
31
- clockTolerance: 30000, // ms, optional
34
+ amphora, // IAmphora — key store
35
+ logger, // ILogger
36
+ issuer: "https://example.com", // optional; falls back to amphora.domain
37
+ clockTolerance: 30, // optional, in seconds (default 0)
32
38
  encryption: "A256GCM", // optional, default "A256GCM"
33
- encAlgorithm: "ECDH-ES", // optional, default encryption algorithm
34
- sigAlgorithm: "ES256", // optional, default signing algorithm
39
+ encAlgorithm: "ECDH-ES", // optional restricts encryption key selection
40
+ sigAlgorithm: "ES256", // optional restricts signing key selection
41
+ certBindingMode: "strict", // optional, "strict" | "lax" (default "strict")
42
+ dpopMaxSkew: 60, // optional, in seconds (default 60)
35
43
  });
36
44
  ```
37
45
 
38
46
  ### Namespaced operations
39
47
 
40
48
  ```typescript
41
- // JWT
42
49
  const signed = await aegis.jwt.sign({
43
50
  expires: "1h",
44
- subject: "u1",
51
+ subject: "user-123",
45
52
  tokenType: "access_token",
53
+ audience: ["https://api.example.com"],
54
+ scope: ["read", "write"],
55
+ claims: { role: "admin" },
46
56
  });
47
- const parsed = await aegis.jwt.verify(signed.token);
48
57
 
49
- // CWT
50
- const cwt = await aegis.cwt.sign({
51
- expires: "1h",
52
- subject: "u1",
53
- tokenType: "access_token",
58
+ const parsed = await aegis.jwt.verify(signed.token, {
59
+ audience: "https://api.example.com",
60
+ scope: ["read"],
54
61
  });
55
- const cwtParsed = await aegis.cwt.verify(cwt.token);
56
62
 
57
- // JWS / CWS sign and verify arbitrary data
58
- const jws = await aegis.jws.sign("data");
59
- const cws = await aegis.cws.sign("data");
63
+ const jws = await aegis.jws.sign("payload");
64
+ const verifiedJws = await aegis.jws.verify(jws.token);
60
65
 
61
- // JWE / CWE — encrypt and decrypt
62
66
  const jwe = await aegis.jwe.encrypt("secret");
63
- const cwe = await aegis.cwe.encrypt("secret");
67
+ const decrypted = await aegis.jwe.decrypt(jwe.token);
68
+ ```
64
69
 
65
- // AES — returns base64 encoded string by default
66
- const encoded = await aegis.aes.encrypt("data");
67
- const record = await aegis.aes.encrypt("data", "record");
68
- const serialised = await aegis.aes.encrypt("data", "serialised");
69
- const decrypted = await aegis.aes.decrypt(encoded);
70
+ ### AES helpers
71
+
72
+ ```typescript
73
+ const encoded = await aegis.aes.encrypt("data"); // base64 string
74
+ const record = await aegis.aes.encrypt("data", "record"); // AesEncryptionRecord
75
+ const serialised = await aegis.aes.encrypt("data", "serialised"); // SerialisedAesEncryption
76
+ const tokenised = await aegis.aes.encrypt("data", "tokenised"); // base64 string
77
+
78
+ const plain = await aegis.aes.decrypt(encoded);
70
79
  ```
71
80
 
72
81
  ### Universal verification
73
82
 
74
- Automatically detects token type and verifies/decrypts accordingly.
83
+ `aegis.verify` auto-detects JWT, JWS, and JWE compact serialisations. JWE inputs are decrypted first, then the inner payload is re-verified.
75
84
 
76
85
  ```typescript
77
86
  const result = await aegis.verify(anyToken, {
78
87
  audience: "https://api.example.com",
79
88
  });
80
- // Works with JWT, JWE, JWS, CWT, CWE, or CWS
81
- // JWE/CWE tokens are decrypted, then their inner payload is verified
82
89
  ```
83
90
 
84
- ### Static methods
91
+ ### Static helpers
85
92
 
86
- No key or amphora required.
93
+ These do not need a key or amphora.
87
94
 
88
95
  ```typescript
89
96
  Aegis.isJwt(token);
90
- Aegis.isCwt(token);
91
97
  Aegis.isJws(token);
92
- Aegis.isCws(token);
93
98
  Aegis.isJwe(token);
94
- Aegis.isCwe(token);
95
99
 
96
- Aegis.header(token); // TokenHeaderClaims (JOSE tokens only)
97
- Aegis.decode(token); // auto-detect and decode without verification
98
- Aegis.parse(token); // auto-detect, decode, and validate structure
99
- ```
100
+ Aegis.header(token); // decode the JOSE protected header
101
+ Aegis.decode(token); // auto-detect, decode without verifying
102
+ Aegis.parse(token); // auto-detect (JWT or JWS), validate structure
100
103
 
101
- ## Kit Classes
104
+ Aegis.parseUserinfo(claims); // → AegisUserinfo
105
+ Aegis.parseIntrospection(claims); // → AegisIntrospection
106
+ Aegis.validateClaims(claims, matchers); // throws on mismatch
107
+ ```
102
108
 
103
- ### JwtKit
109
+ ## JwtKit
104
110
 
105
- Signs and verifies JSON Web Tokens.
111
+ Synchronous JWT sign and verify against a single `IKryptos` key.
106
112
 
107
113
  ```typescript
108
114
  import { JwtKit } from "@lindorm/aegis";
109
115
 
110
- const kit = new JwtKit({ issuer: "https://example.com", logger, kryptos });
116
+ const kit = new JwtKit({
117
+ issuer: "https://example.com",
118
+ kryptos,
119
+ logger,
120
+ clockTolerance: 30, // seconds, optional
121
+ });
111
122
 
112
- // Sign — returns { token, expiresAt, expiresIn, expiresOn, objectId, tokenId }
113
123
  const signed = kit.sign({
114
124
  expires: "1h",
115
125
  subject: "user-123",
116
126
  tokenType: "access_token",
117
127
  audience: ["https://api.example.com"],
118
128
  claims: { role: "admin" },
119
- scope: ["read", "write"],
120
129
  });
130
+ // → { token, expiresAt, expiresIn, expiresOn, objectId, tokenId }
121
131
 
122
- // Verify — returns { decoded, header, payload, token }
123
132
  const parsed = kit.verify(signed.token, {
124
133
  audience: "https://api.example.com",
125
134
  scope: ["read"],
126
135
  });
127
136
 
128
- // Static methods (no key required)
129
- JwtKit.isJwt(token); // boolean
130
- JwtKit.decode(token); // { header, payload, signature }
131
- JwtKit.parse(token); // { decoded, header, payload, token }
132
- JwtKit.validate(payload, options); // throws on mismatch
133
- ```
134
-
135
- ### CwtKit
136
-
137
- Signs and verifies CBOR Web Tokens (RFC 8392). Uses COSE Sign1 structure with CBOR-encoded payloads and integer claim labels.
138
-
139
- ```typescript
140
- import { CwtKit } from "@lindorm/aegis";
141
-
142
- const kit = new CwtKit({ issuer: "https://example.com", logger, kryptos });
143
-
144
- // Sign — returns { buffer, token, expiresAt, expiresIn, expiresOn, objectId, tokenId }
145
- const signed = kit.sign({
146
- expires: "1h",
147
- subject: "user-123",
148
- tokenType: "access_token",
149
- claims: { 900: "custom-value", 901: 42 }, // integer labels >= 900
150
- });
151
-
152
- // Verify — accepts Buffer or base64url string
153
- const parsed = kit.verify(signed.token, {
154
- tokenType: "access_token",
155
- });
156
-
157
- // Static methods
158
- CwtKit.isCwt(token);
159
- CwtKit.decode(token);
160
- CwtKit.parse(token);
161
- CwtKit.validate(payload, options);
137
+ JwtKit.isJwt(token);
138
+ JwtKit.decode(token);
139
+ JwtKit.parse(token);
140
+ JwtKit.validate(payload, matchers);
162
141
  ```
163
142
 
164
- **COSE target modes:** Pass `{ target: "external" }` to sign options to emit string keys for proprietary labels instead of integer CBOR labels. Standard RFC claims (iss, sub, exp, etc.) always use integer labels regardless of target.
143
+ ## JwsKit
165
144
 
166
- **Custom claim labels:** Numeric keys >= 900 in the `claims` object are encoded as compact integer CBOR labels. Keys below 900 are rejected to prevent collision with IANA-assigned (1-255) and Lindorm-reserved (400-599) ranges.
167
-
168
- ### CwsKit
169
-
170
- Signs and verifies arbitrary data using COSE Sign1 (RFC 9052).
171
-
172
- ```typescript
173
- import { CwsKit } from "@lindorm/aegis";
174
-
175
- const kit = new CwsKit({ logger, kryptos });
176
-
177
- // Sign string or Buffer — returns { buffer, objectId, token }
178
- const signed = kit.sign("hello world", {
179
- objectId: "msg-001",
180
- target: "internal", // or "external"
181
- });
182
-
183
- // Verify — returns { decoded, header, payload, token }
184
- const parsed = kit.verify(signed.token);
185
- // parsed.payload === "hello world"
186
-
187
- // Static methods
188
- CwsKit.isCws(token);
189
- CwsKit.decode(token);
190
- CwsKit.parse(token);
191
- ```
192
-
193
- ### CweKit
194
-
195
- Encrypts and decrypts data using COSE Encrypt (RFC 9052).
196
-
197
- ```typescript
198
- import { CweKit } from "@lindorm/aegis";
199
-
200
- const kit = new CweKit({ logger, kryptos, encryption: "A256GCM" });
201
-
202
- // Encrypt string or Buffer — returns { buffer, token }
203
- const encrypted = kit.encrypt("secret data", {
204
- objectId: "msg-002",
205
- target: "internal",
206
- });
207
-
208
- // Decrypt — returns { decoded, header, payload, token }
209
- const decrypted = kit.decrypt(encrypted.token);
210
- // decrypted.payload === "secret data"
211
-
212
- // Static methods
213
- CweKit.isCwe(token);
214
- CweKit.decode(token);
215
- ```
216
-
217
- ### JwsKit
218
-
219
- Signs and verifies arbitrary data using JSON Web Signatures.
145
+ Synchronous JWS sign and verify over arbitrary `string` or `Buffer` data.
220
146
 
221
147
  ```typescript
222
148
  import { JwsKit } from "@lindorm/aegis";
223
149
 
224
- const kit = new JwsKit({ logger, kryptos });
150
+ const kit = new JwsKit({ kryptos, logger });
225
151
 
226
- // Sign string or Buffer — returns { objectId, token }
227
- const signed = kit.sign("hello world", { objectId: "msg-003" });
152
+ const signed = kit.sign("hello world", { objectId: "msg-001" });
153
+ // { token, objectId }
228
154
 
229
- // Verify returns { decoded, header, payload, token }
230
- const parsed = kit.verify(signed.token);
155
+ const parsed = kit.verify<string>(signed.token);
156
+ // parsed.payload === "hello world"
231
157
 
232
- // Static methods
233
158
  JwsKit.isJws(token);
234
159
  JwsKit.decode(token);
235
160
  JwsKit.parse(token);
236
161
  ```
237
162
 
238
- ### JweKit
163
+ ## JweKit
239
164
 
240
- Encrypts and decrypts data using JSON Web Encryption.
165
+ Synchronous JWE encrypt and decrypt over `string` data.
241
166
 
242
167
  ```typescript
243
168
  import { JweKit } from "@lindorm/aegis";
244
169
 
245
- const kit = new JweKit({ logger, kryptos, encryption: "A256GCM" });
170
+ const kit = new JweKit({
171
+ kryptos,
172
+ logger,
173
+ encryption: "A256GCM", // optional; falls back to kryptos.encryption
174
+ });
246
175
 
247
- // Encrypt string returns { token }
248
- const encrypted = kit.encrypt("secret data", { objectId: "msg-004" });
176
+ const encrypted = kit.encrypt("secret data", { objectId: "msg-002" });
177
+ // { token }
249
178
 
250
- // Decrypt — returns { decoded, header, payload, token }
251
179
  const decrypted = kit.decrypt(encrypted.token);
180
+ // → { decoded, header, payload, token }
252
181
 
253
- // Static methods
254
182
  JweKit.isJwe(token);
255
183
  JweKit.decode(token);
256
184
  ```
257
185
 
258
- ### SignatureKit
186
+ Compressed payloads (`zip` header) are explicitly rejected.
187
+
188
+ ## SignatureKit
259
189
 
260
- Low-level signature operations over raw data.
190
+ Low-level signature primitives over raw bytes. Dispatches to the appropriate driver kit based on `kryptos.type` (AKP / EC / OKP / RSA / oct).
261
191
 
262
192
  ```typescript
263
193
  import { SignatureKit } from "@lindorm/aegis";
@@ -266,27 +196,27 @@ const kit = new SignatureKit({ kryptos });
266
196
 
267
197
  const signature = kit.sign(data); // Buffer
268
198
  const valid = kit.verify(data, signature); // boolean
269
- kit.assert(data, signature); // throws if invalid
270
- kit.format(signature); // string
199
+ kit.assert(data, signature); // throws on mismatch
200
+ const formatted = kit.format(signature); // string
271
201
  ```
272
202
 
273
- ## Sign Content
203
+ ## Sign content shape
274
204
 
275
- The `SignJwtContent` / `SignCwtContent` types share the same shape:
205
+ `SignJwtContent` accepts the standard, OIDC, OAuth, PoP, delegation, and Lindorm claim families plus:
276
206
 
277
207
  ```typescript
278
208
  {
279
- // Required
280
- expires: string | Date; // "1h", "30m", Date, etc.
281
- subject: string;
282
- tokenType: string;
209
+ expires: string | Date; // required, e.g. "1h", "30m", or a Date
210
+ subject: string; // required
211
+ tokenType: string; // required, e.g. "access_token"
283
212
 
284
- // Optional
285
213
  audience?: string[];
286
- claims?: Record<string, any>; // custom claims (CWT supports integer keys >= 900)
214
+ claims?: Record<string, any>; // arbitrary custom claims
287
215
  scope?: string[];
288
216
  permissions?: string[];
289
217
  roles?: string[];
218
+ groups?: string[];
219
+ entitlements?: string[];
290
220
  clientId?: string;
291
221
  grantType?: string;
292
222
  tenantId?: string;
@@ -295,50 +225,82 @@ The `SignJwtContent` / `SignCwtContent` types share the same shape:
295
225
  notBefore?: Date;
296
226
  authTime?: Date;
297
227
  authContextClass?: string;
298
- authFactor?: string;
228
+ authFactor?: string[];
299
229
  authMethods?: string[];
300
230
  authorizedParty?: string;
301
231
  adjustedAccessLevel?: number;
302
232
  levelOfAssurance?: number;
303
233
  sessionHint?: string;
304
234
  subjectHint?: string;
235
+ // …plus the rest of the StdClaims / OidcClaims / DelegationClaims surface
305
236
  }
306
237
  ```
307
238
 
308
- ## Verify Options
239
+ ## Verify options
309
240
 
310
- All fields are optional and support `PredicateOperator` for flexible matching:
241
+ `VerifyJwtOptions` extends the claim matcher set. Each field accepts either a literal value or a `PredicateOperator` for flexible matching:
311
242
 
312
243
  ```typescript
313
- kit.verify(token, {
314
- audience: "https://api.example.com", // exact match
244
+ await aegis.jwt.verify(token, {
245
+ audience: "https://api.example.com",
315
246
  scope: ["read", "write"], // array contains
316
- tokenType: { $eq: "access_token" }, // predicate operator
317
- subject: { $in: ["user-1", "user-2"] }, // set membership
318
- levelOfAssurance: { $gte: 2 }, // numeric comparison
247
+ tokenType: "access_token",
248
+ subject: { $in: ["user-1", "user-2"] },
249
+ levelOfAssurance: { $gte: 2 },
250
+ authTime: { $gte: new Date("2024-01-01") },
319
251
  });
320
252
  ```
321
253
 
254
+ Additional verify options:
255
+
256
+ - `actor` — controls token-delegation (`act`) chain enforcement
257
+ - `dpopProof` — when present, the verifier requires a `cnf.jkt` binding and validates the supplied DPoP proof
258
+ - `trustBoundThumbprint` — when `true`, allow a bound token without an inline DPoP proof (for cases where the binding is enforced out-of-band)
259
+
260
+ ## Type guards
261
+
262
+ ```typescript
263
+ import { isParsedJwt, isParsedJws } from "@lindorm/aegis";
264
+
265
+ const parsed = await aegis.verify(token);
266
+ if (isParsedJwt(parsed)) {
267
+ /* parsed.payload typed as ParsedJwtPayload */
268
+ }
269
+ if (isParsedJws(parsed)) {
270
+ /* parsed.payload typed as Buffer | string */
271
+ }
272
+ ```
273
+
322
274
  ## Errors
323
275
 
324
276
  ```typescript
325
277
  import {
326
- AegisError, // base error
278
+ AegisError, // base class
327
279
  JwtError,
328
280
  JwsError,
329
281
  JweError,
330
- CwtError,
331
- CoseSignError,
332
- CoseEncryptError,
333
282
  } from "@lindorm/aegis";
334
283
  ```
335
284
 
285
+ ## Security notes
286
+
287
+ - Signature/decryption keys are always sourced from the supplied `IAmphora`. The `jku`, `jwk`, `x5u`, `x5c`, `x5t`, and `x5t#S256` JOSE header parameters are never trusted as key sources during verification — only `kid` is used as a lookup key into Amphora.
288
+ - JWE payload compression (`zip` header) is rejected outright.
289
+ - Critical header parameters are enforced per RFC 7515 §4.1.11; unknown `crit` entries cause verification to fail.
290
+ - DPoP-bound tokens (`cnf.jkt`) require either a matching DPoP proof or `trustBoundThumbprint: true` on verify.
291
+
336
292
  ## Testing
337
293
 
294
+ The package ships pre-built mock factories for both Jest and Vitest. Import from the runner-specific subpath:
295
+
338
296
  ```typescript
339
- import { createMockAegis } from "@lindorm/aegis";
297
+ // Jest
298
+ import { createMockAegis } from "@lindorm/aegis/mocks/jest";
299
+
300
+ // Vitest
301
+ import { createMockAegis } from "@lindorm/aegis/mocks/vitest";
340
302
 
341
- const aegis = createMockAegis(); // fully mocked IAegis with jest.fn() stubs
303
+ const aegis = createMockAegis(); // fully mocked IAegis
342
304
  ```
343
305
 
344
306
  ## License
@@ -1,7 +1,8 @@
1
1
  import { KryptosKit } from "@lindorm/kryptos";
2
- import { createMockLogger } from "@lindorm/logger";
2
+ import { createMockLogger } from "@lindorm/logger/mocks/vitest";
3
3
  import { CompactEncrypt, compactDecrypt, importJWK } from "jose";
4
- import { JweKit } from "../src/classes/JweKit";
4
+ import { JweKit } from "../src/classes/JweKit.js";
5
+ import { describe, expect, test } from "vitest";
5
6
 
6
7
  // ---------------------------------------------------------------------------
7
8
  // Shared constants
@@ -1,12 +1,9 @@
1
1
  import { KryptosKit } from "@lindorm/kryptos";
2
- import { createMockLogger } from "@lindorm/logger";
2
+ import { createMockLogger } from "@lindorm/logger/mocks/vitest";
3
3
  import { importJWK, jwtVerify, SignJWT } from "jose";
4
- import type { JwtPayload } from "jsonwebtoken";
5
- import { createRequire } from "module";
6
- import { JwtKit } from "../src/classes/JwtKit";
7
-
8
- const require = createRequire(import.meta.url);
9
- const jsonwebtoken = require("jsonwebtoken") as typeof import("jsonwebtoken");
4
+ import jsonwebtoken, { type JwtPayload } from "jsonwebtoken";
5
+ import { JwtKit } from "../src/classes/JwtKit.js";
6
+ import { describe, expect, test } from "vitest";
10
7
 
11
8
  // ---------------------------------------------------------------------------
12
9
  // Shared constants
@@ -1,8 +1,8 @@
1
- import { Dict } from "@lindorm/types";
2
- import { IAegis, IAegisAes, IAegisJwe, IAegisJws, IAegisJwt } from "../interfaces";
3
- import { AegisIntrospection, AegisOptions, AegisUserinfo, DecodedJwe, DecodedJws, DecodedJwt, ParsedJws, ParsedJwt, TokenHeaderClaims, ValidateJwtOptions, VerifyJwtOptions } from "../types";
4
- import { IntrospectClaimsInput } from "../internal/utils/parse-introspection";
5
- import { UserinfoClaimsInput } from "../internal/utils/parse-userinfo";
1
+ import type { Dict } from "@lindorm/types";
2
+ import type { IAegis, IAegisAes, IAegisJwe, IAegisJws, IAegisJwt } from "../interfaces/index.js";
3
+ import type { AegisIntrospection, AegisOptions, AegisUserinfo, DecodedJwe, DecodedJws, DecodedJwt, ParsedJws, ParsedJwt, TokenHeaderClaims, ValidateJwtOptions, VerifyJwtOptions } from "../types/index.js";
4
+ import { type IntrospectClaimsInput } from "../internal/utils/parse-introspection.js";
5
+ import { type UserinfoClaimsInput } from "../internal/utils/parse-userinfo.js";
6
6
  export declare class Aegis implements IAegis {
7
7
  readonly issuer: string | null;
8
8
  private readonly amphora;
@@ -1 +1 @@
1
- {"version":3,"file":"Aegis.d.ts","sourceRoot":"","sources":["../../src/classes/Aegis.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EACL,kBAAkB,EAClB,YAAY,EAEZ,aAAa,EAEb,UAAU,EACV,UAAU,EACV,UAA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