@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
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JweError = void 0;
4
- const errors_1 = require("@lindorm/errors");
5
- class JweError extends errors_1.LindormError {
1
+ import { LindormError } from "@lindorm/errors";
2
+ export class JweError extends LindormError {
6
3
  }
7
- exports.JweError = JweError;
8
4
  //# sourceMappingURL=JweError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JweError.js","sourceRoot":"","sources":["../../src/errors/JweError.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAE/C,MAAa,QAAS,SAAQ,qBAAY;CAAG;AAA7C,4BAA6C"}
1
+ {"version":3,"file":"JweError.js","sourceRoot":"","sources":["../../src/errors/JweError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG"}
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JwsError = void 0;
4
- const errors_1 = require("@lindorm/errors");
5
- class JwsError extends errors_1.LindormError {
1
+ import { LindormError } from "@lindorm/errors";
2
+ export class JwsError extends LindormError {
6
3
  }
7
- exports.JwsError = JwsError;
8
4
  //# sourceMappingURL=JwsError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JwsError.js","sourceRoot":"","sources":["../../src/errors/JwsError.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAE/C,MAAa,QAAS,SAAQ,qBAAY;CAAG;AAA7C,4BAA6C"}
1
+ {"version":3,"file":"JwsError.js","sourceRoot":"","sources":["../../src/errors/JwsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG"}
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JwtError = void 0;
4
- const errors_1 = require("@lindorm/errors");
5
- class JwtError extends errors_1.LindormError {
1
+ import { LindormError } from "@lindorm/errors";
2
+ export class JwtError extends LindormError {
6
3
  }
7
- exports.JwtError = JwtError;
8
4
  //# sourceMappingURL=JwtError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JwtError.js","sourceRoot":"","sources":["../../src/errors/JwtError.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAE/C,MAAa,QAAS,SAAQ,qBAAY;CAAG;AAA7C,4BAA6C"}
1
+ {"version":3,"file":"JwtError.js","sourceRoot":"","sources":["../../src/errors/JwtError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG"}
@@ -1,5 +1,5 @@
1
- export * from "./AegisError";
2
- export * from "./JweError";
3
- export * from "./JwsError";
4
- export * from "./JwtError";
1
+ export * from "./AegisError.js";
2
+ export * from "./JweError.js";
3
+ export * from "./JwsError.js";
4
+ export * from "./JwtError.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -1,21 +1,5 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AegisError"), exports);
18
- __exportStar(require("./JweError"), exports);
19
- __exportStar(require("./JwsError"), exports);
20
- __exportStar(require("./JwtError"), exports);
1
+ export * from "./AegisError.js";
2
+ export * from "./JweError.js";
3
+ export * from "./JwsError.js";
4
+ export * from "./JwtError.js";
21
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,6CAA2B;AAC3B,6CAA2B;AAC3B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from "./is-parsed-jws";
2
- export * from "./is-parsed-jwt";
1
+ export * from "./is-parsed-jws.js";
2
+ export * from "./is-parsed-jwt.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
@@ -1,19 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./is-parsed-jws"), exports);
18
- __exportStar(require("./is-parsed-jwt"), exports);
1
+ export * from "./is-parsed-jws.js";
2
+ export * from "./is-parsed-jwt.js";
19
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
@@ -1,3 +1,3 @@
1
- import { ParsedJws, ParsedJwt } from "../types";
1
+ import type { ParsedJws, ParsedJwt } from "../types/index.js";
2
2
  export declare const isParsedJws: <T extends Buffer | string = Buffer | string>(token: ParsedJwt | ParsedJws<T>) => token is ParsedJws<T>;
3
3
  //# sourceMappingURL=is-parsed-jws.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-parsed-jws.d.ts","sourceRoot":"","sources":["../../src/guards/is-parsed-jws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EACrE,OAAO,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,KAC9B,KAAK,IAAI,SAAS,CAAC,CAAC,CAAsC,CAAC"}
1
+ {"version":3,"file":"is-parsed-jws.d.ts","sourceRoot":"","sources":["../../src/guards/is-parsed-jws.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9D,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EACrE,OAAO,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,KAC9B,KAAK,IAAI,SAAS,CAAC,CAAC,CAAsC,CAAC"}
@@ -1,6 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isParsedJws = void 0;
4
- const isParsedJws = (token) => token.header.baseFormat === "JWS";
5
- exports.isParsedJws = isParsedJws;
1
+ export const isParsedJws = (token) => token.header.baseFormat === "JWS";
6
2
  //# sourceMappingURL=is-parsed-jws.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-parsed-jws.js","sourceRoot":"","sources":["../../src/guards/is-parsed-jws.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CACzB,KAA+B,EACR,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC;AAFjD,QAAA,WAAW,eAEsC"}
1
+ {"version":3,"file":"is-parsed-jws.js","sourceRoot":"","sources":["../../src/guards/is-parsed-jws.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,KAA+B,EACR,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC"}
@@ -1,3 +1,3 @@
1
- import { ParsedJws, ParsedJwt } from "../types";
1
+ import type { ParsedJws, ParsedJwt } from "../types/index.js";
2
2
  export declare const isParsedJwt: (token: ParsedJwt | ParsedJws<any>) => token is ParsedJwt;
3
3
  //# sourceMappingURL=is-parsed-jwt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-parsed-jwt.d.ts","sourceRoot":"","sources":["../../src/guards/is-parsed-jwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,KAAG,KAAK,IAAI,SACtC,CAAC"}
1
+ {"version":3,"file":"is-parsed-jwt.d.ts","sourceRoot":"","sources":["../../src/guards/is-parsed-jwt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9D,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,KAAG,KAAK,IAAI,SACtC,CAAC"}
@@ -1,6 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isParsedJwt = void 0;
4
- const isParsedJwt = (token) => token.header.baseFormat === "JWT";
5
- exports.isParsedJwt = isParsedJwt;
1
+ export const isParsedJwt = (token) => token.header.baseFormat === "JWT";
6
2
  //# sourceMappingURL=is-parsed-jwt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-parsed-jwt.js","sourceRoot":"","sources":["../../src/guards/is-parsed-jwt.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CAAC,KAAiC,EAAsB,EAAE,CACnF,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC;AADvB,QAAA,WAAW,eACY"}
1
+ {"version":3,"file":"is-parsed-jwt.js","sourceRoot":"","sources":["../../src/guards/is-parsed-jwt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAiC,EAAsB,EAAE,CACnF,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- export * from "./classes";
2
- export * from "./errors";
3
- export * from "./guards";
4
- export * from "./interfaces";
5
- export * from "./mocks";
6
- export * from "./types";
7
- export type { TokenType } from "./constants/token-type";
1
+ export * from "./classes/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./guards/index.js";
4
+ export * from "./interfaces/index.js";
5
+ export * from "./types/index.js";
6
+ export type { TokenType } from "./constants/token-type.js";
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AAEjC,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -1,23 +1,6 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./classes"), exports);
18
- __exportStar(require("./errors"), exports);
19
- __exportStar(require("./guards"), exports);
20
- __exportStar(require("./interfaces"), exports);
21
- __exportStar(require("./mocks"), exports);
22
- __exportStar(require("./types"), exports);
1
+ export * from "./classes/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./guards/index.js";
4
+ export * from "./interfaces/index.js";
5
+ export * from "./types/index.js";
23
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -1,6 +1,6 @@
1
- import { AesContent, AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "@lindorm/aes";
2
- import { Dict } from "@lindorm/types";
3
- import { DecryptedJwe, EncryptedJwe, JweEncryptOptions, JwsContent, ParsedJws, ParsedJwt, SignJwsOptions, SignJwtContent, SignJwtOptions, SignedJws, SignedJwt, VerifyJwtOptions } from "../types";
1
+ import type { AesContent, AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "@lindorm/aes";
2
+ import type { Dict } from "@lindorm/types";
3
+ import type { DecryptedJwe, EncryptedJwe, JweEncryptOptions, JwsContent, ParsedJws, ParsedJwt, SignJwsOptions, SignJwtContent, SignJwtOptions, SignedJws, SignedJwt, VerifyJwtOptions } from "../types/index.js";
4
4
  export interface IAegisAes {
5
5
  encrypt(data: AesContent, mode?: "encoded"): Promise<string>;
6
6
  encrypt(data: AesContent, mode: "record"): Promise<AesEncryptionRecord>;
@@ -1 +1 @@
1
- {"version":3,"file":"Aegis.d.ts","sourceRoot":"","sources":["../../src/interfaces/Aegis.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACt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I,EACxB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,CAAC;IACtB,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EAC1B,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,GAAG,EAAE,SAAS,CAAC;IAEf,GAAG,EAAE,SAAS,CAAC;IACf,GAAG,EAAE,SAAS,CAAC;IACf,GAAG,EAAE,SAAS,CAAC;IAEf,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,MAAM,CAAC,CAAC,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACpF"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=Aegis.js.map
@@ -1,4 +1,4 @@
1
- import { DecryptedJwe, EncryptedJwe, JweEncryptOptions } from "../types";
1
+ import type { DecryptedJwe, EncryptedJwe, JweEncryptOptions } from "../types/index.js";
2
2
  export interface IJweKit {
3
3
  encrypt(data: string, options?: JweEncryptOptions): EncryptedJwe;
4
4
  decrypt(token: string): DecryptedJwe;
@@ -1 +1 @@
1
- {"version":3,"file":"JweKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JweKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEzE,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,YAAY,CAAC;IACjE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;CACtC"}
1
+ {"version":3,"file":"JweKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JweKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEvF,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,YAAY,CAAC;IACjE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;CACtC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=JweKit.js.map
@@ -1,4 +1,4 @@
1
- import { JwsContent, ParsedJws, SignJwsOptions, SignedJws } from "../types";
1
+ import type { JwsContent, ParsedJws, SignJwsOptions, SignedJws } from "../types/index.js";
2
2
  export interface IJwsKit {
3
3
  sign<T extends JwsContent>(data: T, options?: SignJwsOptions): SignedJws;
4
4
  verify<T extends JwsContent>(token: string): ParsedJws<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"JwsKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JwsKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE5E,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACzE,MAAM,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;CAC3D"}
1
+ {"version":3,"file":"JwsKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JwsKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE1F,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACzE,MAAM,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;CAC3D"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=JwsKit.js.map
@@ -1,5 +1,5 @@
1
- import { Dict } from "@lindorm/types";
2
- import { ParsedJwt, SignJwtContent, SignJwtOptions, SignedJwt, VerifyJwtOptions } from "../types";
1
+ import type { Dict } from "@lindorm/types";
2
+ import type { ParsedJwt, SignJwtContent, SignJwtOptions, SignedJwt, VerifyJwtOptions } from "../types/index.js";
3
3
  export interface IJwtKit {
4
4
  sign<T extends Dict = Dict>(content: SignJwtContent<T>, options?: SignJwtOptions): SignedJwt;
5
5
  verify<T extends Dict = Dict>(token: string, verify?: VerifyJwtOptions): ParsedJwt<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"JwtKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JwtKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EACxB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,SAAS,CAAC;IACb,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;CACvF"}
1
+ {"version":3,"file":"JwtKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/JwtKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EACxB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,SAAS,CAAC;IACb,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;CACvF"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=JwtKit.js.map
@@ -1,5 +1,5 @@
1
- export * from "./Aegis";
2
- export * from "./JweKit";
3
- export * from "./JwsKit";
4
- export * from "./JwtKit";
1
+ export * from "./Aegis.js";
2
+ export * from "./JweKit.js";
3
+ export * from "./JwsKit.js";
4
+ export * from "./JwtKit.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -1,21 +1,5 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Aegis"), exports);
18
- __exportStar(require("./JweKit"), exports);
19
- __exportStar(require("./JwsKit"), exports);
20
- __exportStar(require("./JwtKit"), exports);
1
+ export * from "./Aegis.js";
2
+ export * from "./JweKit.js";
3
+ export * from "./JwsKit.js";
4
+ export * from "./JwtKit.js";
21
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AEGIS_PROFILE_WIRE_KEYS = void 0;
4
- exports.AEGIS_PROFILE_WIRE_KEYS = new Set([
1
+ export const AEGIS_PROFILE_WIRE_KEYS = new Set([
5
2
  "address",
6
3
  "email",
7
4
  "email_verified",
@@ -1 +1 @@
1
- {"version":3,"file":"aegis-profile-keys.js","sourceRoot":"","sources":["../../../src/internal/constants/aegis-profile-keys.ts"],"names":[],"mappings":";;;AAOa,QAAA,uBAAuB,GAAwB,IAAI,GAAG,CAAC;IAElE,SAAS;IAGT,OAAO;IACP,gBAAgB;IAChB,cAAc;IACd,uBAAuB;IAGvB,SAAS;IAGT,WAAW;IACX,aAAa;IACb,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,MAAM;IACN,UAAU;IACV,oBAAoB;IACpB,SAAS;IACT,YAAY;IACZ,SAAS;IACT,UAAU;IAGV,cAAc;IACd,WAAW;IACX,YAAY;IACZ,qBAAqB;IACrB,eAAe;IACf,yBAAyB;IACzB,gBAAgB;IAChB,UAAU;IAGV,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,cAAc;CACf,CAAC,CAAC"}
1
+ {"version":3,"file":"aegis-profile-keys.js","sourceRoot":"","sources":["../../../src/internal/constants/aegis-profile-keys.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC;IAElE,SAAS;IAGT,OAAO;IACP,gBAAgB;IAChB,cAAc;IACd,uBAAuB;IAGvB,SAAS;IAGT,WAAW;IACX,aAAa;IACb,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,MAAM;IACN,UAAU;IACV,oBAAoB;IACpB,SAAS;IACT,YAAY;IACZ,SAAS;IACT,UAAU;IAGV,cAAc;IACd,WAAW;IACX,YAAY;IACZ,qBAAqB;IACrB,eAAe;IACf,yBAAyB;IACzB,gBAAgB;IAChB,UAAU;IAGV,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,cAAc;CACf,CAAC,CAAC"}
@@ -1,5 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.B64U = void 0;
4
- exports.B64U = "base64url";
1
+ export const B64U = "base64url";
5
2
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/internal/constants/format.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,WAAoB,CAAC"}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/internal/constants/format.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,WAAoB,CAAC"}
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOKEN_HEADER_TYPES = exports.TOKEN_HEADER_ALGORITHMS = void 0;
4
- const kryptos_1 = require("@lindorm/kryptos");
5
- exports.TOKEN_HEADER_ALGORITHMS = [
6
- ...kryptos_1.AKP_SIG_ALGORITHMS,
7
- ...kryptos_1.EC_ENC_ALGORITHMS,
8
- ...kryptos_1.EC_SIG_ALGORITHMS,
9
- ...kryptos_1.OKP_ENC_ALGORITHMS,
10
- ...kryptos_1.OKP_SIG_ALGORITHMS,
11
- ...kryptos_1.RSA_ENC_ALGORITHMS,
12
- ...kryptos_1.RSA_SIG_ALGORITHMS,
13
- ...kryptos_1.OCT_ENC_DIR_ALGORITHMS,
14
- ...kryptos_1.OCT_ENC_STD_ALGORITHMS,
15
- ...kryptos_1.OCT_SIG_ALGORITHMS,
1
+ import { AKP_SIG_ALGORITHMS, EC_ENC_ALGORITHMS, EC_SIG_ALGORITHMS, OCT_ENC_DIR_ALGORITHMS, OCT_ENC_STD_ALGORITHMS, OCT_SIG_ALGORITHMS, OKP_ENC_ALGORITHMS, OKP_SIG_ALGORITHMS, RSA_ENC_ALGORITHMS, RSA_SIG_ALGORITHMS, } from "@lindorm/kryptos";
2
+ export const TOKEN_HEADER_ALGORITHMS = [
3
+ ...AKP_SIG_ALGORITHMS,
4
+ ...EC_ENC_ALGORITHMS,
5
+ ...EC_SIG_ALGORITHMS,
6
+ ...OKP_ENC_ALGORITHMS,
7
+ ...OKP_SIG_ALGORITHMS,
8
+ ...RSA_ENC_ALGORITHMS,
9
+ ...RSA_SIG_ALGORITHMS,
10
+ ...OCT_ENC_DIR_ALGORITHMS,
11
+ ...OCT_ENC_STD_ALGORITHMS,
12
+ ...OCT_SIG_ALGORITHMS,
16
13
  ];
17
- exports.TOKEN_HEADER_TYPES = [
14
+ export const TOKEN_HEADER_TYPES = [
18
15
  "JWE",
19
16
  "JWS",
20
17
  "JWT",
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/internal/constants/header.ts"],"names":[],"mappings":";;;AAAA,8CAW0B;AAEb,QAAA,uBAAuB,GAAG;IACrC,GAAG,4BAAkB;IACrB,GAAG,2BAAiB;IACpB,GAAG,2BAAiB;IACpB,GAAG,4BAAkB;IACrB,GAAG,4BAAkB;IACrB,GAAG,4BAAkB;IACrB,GAAG,4BAAkB;IACrB,GAAG,gCAAsB;IACzB,GAAG,gCAAsB;IACzB,GAAG,4BAAkB;CACb,CAAC;AAEE,QAAA,kBAAkB,GAAG;IAEhC,KAAK;IACL,KAAK;IACL,KAAK;CACG,CAAC"}
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/internal/constants/header.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,kBAAkB;IACrB,GAAG,iBAAiB;IACpB,GAAG,iBAAiB;IACpB,GAAG,kBAAkB;IACrB,GAAG,kBAAkB;IACrB,GAAG,kBAAkB;IACrB,GAAG,kBAAkB;IACrB,GAAG,sBAAsB;IACzB,GAAG,sBAAsB;IACzB,GAAG,kBAAkB;CACb,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAEhC,KAAK;IACL,KAAK;IACL,KAAK;CACG,CAAC"}
@@ -1,13 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.computeJwkThumbprint = void 0;
4
- const sha_1 = require("@lindorm/sha");
5
- const errors_1 = require("../../errors");
6
- const computeJwkThumbprint = (jwk) => {
1
+ import { ShaKit } from "@lindorm/sha";
2
+ import { JwtError } from "../../errors/index.js";
3
+ export const computeJwkThumbprint = (jwk) => {
7
4
  const canonical = computeCanonicalJwk(jwk);
8
- return sha_1.ShaKit.S256(JSON.stringify(canonical));
5
+ return ShaKit.S256(JSON.stringify(canonical));
9
6
  };
10
- exports.computeJwkThumbprint = computeJwkThumbprint;
11
7
  const computeCanonicalJwk = (jwk) => {
12
8
  switch (jwk.kty) {
13
9
  case "EC":
@@ -19,7 +15,7 @@ const computeCanonicalJwk = (jwk) => {
19
15
  case "oct":
20
16
  return { k: jwk.k, kty: jwk.kty };
21
17
  default:
22
- throw new errors_1.JwtError(`Cannot compute JWK thumbprint: unsupported kty "${String(jwk.kty)}"`);
18
+ throw new JwtError(`Cannot compute JWK thumbprint: unsupported kty "${String(jwk.kty)}"`);
23
19
  }
24
20
  };
25
21
  //# sourceMappingURL=compute-jwk-thumbprint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compute-jwk-thumbprint.js","sourceRoot":"","sources":["../../../src/internal/utils/compute-jwk-thumbprint.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,yCAAwC;AAUjC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAU,EAAE;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MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAU,EAAE;IAC1D,MAAM,SAAS,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAA2B,EAAE;IACnE,QAAQ,GAAG,CAAC,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;QAE5D,KAAK,KAAK;YACR,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;QAE9C,KAAK,KAAK;YACR,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;QAElD,KAAK,KAAK;YACR,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;QAEpC;YACE,MAAM,IAAI,QAAQ,CAChB,mDAAmD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CACtE,CAAC;IACN,CAAC;AACH,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { TokenType } from "../../constants/token-type";
2
- import { BaseTokenFormat } from "../../types/header";
1
+ import { type TokenType } from "../../constants/token-type.js";
2
+ import type { BaseTokenFormat } from "../../types/header.js";
3
3
  export type KitFormat = "jwt" | "jws" | "jwe";
4
4
  export declare const computeTypHeader: (tokenType: TokenType | undefined, kitFormat: KitFormat) => string;
5
5
  export declare const decodeTokenTypeFromTyp: (typ: string | undefined, kitFormat: KitFormat) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"compute-typ-header.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/compute-typ-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAc9C,eAAO,MAAM,gBAAgB,GAC3B,WAAW,SAAS,GAAG,SAAS,EAChC,WAAW,SAAS,KACnB,MAsBF,CAAC;AAOF,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,GAAG,SAAS,EACvB,WAAW,SAAS,KACnB,MAAM,GAAG,SAeX,CAAC;AAQF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,GAAG,SAAS,KAAG,eAAe,GAAG,SAczE,CAAC"}
1
+ {"version":3,"file":"compute-typ-header.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/compute-typ-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAc9C,eAAO,MAAM,gBAAgB,GAC3B,WAAW,SAAS,GAAG,SAAS,EAChC,WAAW,SAAS,KACnB,MAsBF,CAAC;AAOF,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,GAAG,SAAS,EACvB,WAAW,SAAS,KACnB,MAAM,GAAG,SAeX,CAAC;AAQF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,GAAG,SAAS,KAAG,eAAe,GAAG,SAczE,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBaseFormat = exports.decodeTokenTypeFromTyp = exports.computeTypHeader = void 0;
4
- const token_type_1 = require("../../constants/token-type");
1
+ import { TOKEN_TYPE_TO_SHORT_NAME } from "../../constants/token-type.js";
5
2
  const FORMAT_FALLBACK = {
6
3
  jwt: "JWT",
7
4
  jws: "JWS",
@@ -12,7 +9,7 @@ const FORMAT_SUFFIX = {
12
9
  jws: "+jws",
13
10
  jwe: "+jwe",
14
11
  };
15
- const computeTypHeader = (tokenType, kitFormat) => {
12
+ export const computeTypHeader = (tokenType, kitFormat) => {
16
13
  if (tokenType === undefined)
17
14
  return FORMAT_FALLBACK[kitFormat];
18
15
  if (tokenType === "") {
@@ -24,13 +21,12 @@ const computeTypHeader = (tokenType, kitFormat) => {
24
21
  if (tokenType.includes("+")) {
25
22
  throw new Error('tokenType cannot contain \'+\' — pass the bare type (e.g. "access_token"), not the full typ header (e.g. "at+jwt")');
26
23
  }
27
- const shortName = token_type_1.TOKEN_TYPE_TO_SHORT_NAME[tokenType] ?? tokenType;
24
+ const shortName = TOKEN_TYPE_TO_SHORT_NAME[tokenType] ?? tokenType;
28
25
  if (shortName === "JWT")
29
26
  return "JWT";
30
27
  return `${shortName}${FORMAT_SUFFIX[kitFormat]}`;
31
28
  };
32
- exports.computeTypHeader = computeTypHeader;
33
- const decodeTokenTypeFromTyp = (typ, kitFormat) => {
29
+ export const decodeTokenTypeFromTyp = (typ, kitFormat) => {
34
30
  if (!typ)
35
31
  return undefined;
36
32
  if (typ === FORMAT_FALLBACK[kitFormat])
@@ -38,7 +34,7 @@ const decodeTokenTypeFromTyp = (typ, kitFormat) => {
38
34
  const suffix = FORMAT_SUFFIX[kitFormat];
39
35
  if (typ.endsWith(suffix)) {
40
36
  const shortName = typ.slice(0, -suffix.length);
41
- for (const [tokenType, known] of Object.entries(token_type_1.TOKEN_TYPE_TO_SHORT_NAME)) {
37
+ for (const [tokenType, known] of Object.entries(TOKEN_TYPE_TO_SHORT_NAME)) {
42
38
  if (known === shortName)
43
39
  return tokenType;
44
40
  }
@@ -46,8 +42,7 @@ const decodeTokenTypeFromTyp = (typ, kitFormat) => {
46
42
  }
47
43
  return undefined;
48
44
  };
49
- exports.decodeTokenTypeFromTyp = decodeTokenTypeFromTyp;
50
- const getBaseFormat = (typ) => {
45
+ export const getBaseFormat = (typ) => {
51
46
  if (!typ)
52
47
  return undefined;
53
48
  if (typ === "JWT")
@@ -64,5 +59,4 @@ const getBaseFormat = (typ) => {
64
59
  return "JWE";
65
60
  return undefined;
66
61
  };
67
- exports.getBaseFormat = getBaseFormat;
68
62
  //# sourceMappingURL=compute-typ-header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compute-typ-header.js","sourceRoot":"","sources":["../../../src/internal/utils/compute-typ-header.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AAKjF,MAAM,eAAe,GAA8B;IACjD,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,MAAM,aAAa,GAA8B;IAC/C,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;CACZ,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAC9B,SAAgC,EAChC,SAAoB,EACZ,EAAE;IACV,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;IAE/D,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC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AC;IACvC,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IAEvC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { KryptosAlgorithm } from "@lindorm/kryptos";
1
+ import type { KryptosAlgorithm } from "@lindorm/kryptos";
2
2
  type ShaAlgorithm = "SHA256" | "SHA384" | "SHA512";
3
3
  export declare const shaAlgorithm: (algorithm: KryptosAlgorithm) => ShaAlgorithm;
4
4
  export declare const createAccessTokenHash: (algorithm: KryptosAlgorithm, data: string) => string;