@authup/server-core 1.0.0-beta.62 → 1.0.0-beta.64

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 (769) hide show
  1. package/dist/adapters/database/data-source/options/module.d.ts +1 -0
  2. package/dist/adapters/database/data-source/options/module.d.ts.map +1 -1
  3. package/dist/adapters/database/data-source/options/module.mjs +33 -4
  4. package/dist/adapters/database/data-source/options/module.mjs.map +1 -1
  5. package/dist/adapters/database/domains/client/entity.d.ts +1 -2
  6. package/dist/adapters/database/domains/client/entity.d.ts.map +1 -1
  7. package/dist/adapters/database/domains/client/entity.mjs +7 -14
  8. package/dist/adapters/database/domains/client/entity.mjs.map +1 -1
  9. package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts +9 -1
  10. package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts.map +1 -1
  11. package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs +14 -0
  12. package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs.map +1 -1
  13. package/dist/adapters/database/domains/session/entity.d.ts +8 -0
  14. package/dist/adapters/database/domains/session/entity.d.ts.map +1 -1
  15. package/dist/adapters/database/domains/session/entity.mjs +19 -0
  16. package/dist/adapters/database/domains/session/entity.mjs.map +1 -1
  17. package/dist/adapters/database/domains/user/entity.d.ts +1 -0
  18. package/dist/adapters/database/domains/user/entity.d.ts.map +1 -1
  19. package/dist/adapters/database/domains/user/entity.mjs +6 -0
  20. package/dist/adapters/database/domains/user/entity.mjs.map +1 -1
  21. package/dist/adapters/database/extra-attribute-repository/repository.mjs +1 -1
  22. package/dist/adapters/database/extra-attribute-repository/repository.mjs.map +1 -1
  23. package/dist/adapters/database/extra-attribute-repository/tree/adapter.mjs +4 -2
  24. package/dist/adapters/database/extra-attribute-repository/tree/adapter.mjs.map +1 -1
  25. package/dist/adapters/database/extra-attribute-repository/tree/repository.mjs +1 -1
  26. package/dist/adapters/database/extra-attribute-repository/tree/repository.mjs.map +1 -1
  27. package/dist/adapters/database/index.mjs +3 -3
  28. package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.d.ts +56 -0
  29. package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.d.ts.map +1 -0
  30. package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.mjs +105 -0
  31. package/dist/adapters/database/migrations/mysql/1787571998009-SessionUserAndClientColumns.mjs.map +1 -0
  32. package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.d.ts +56 -0
  33. package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.d.ts.map +1 -0
  34. package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.mjs +104 -0
  35. package/dist/adapters/database/migrations/postgres/1787571998009-SessionUserAndClientColumns.mjs.map +1 -0
  36. package/dist/adapters/database/subscriber/module.d.ts +6 -2
  37. package/dist/adapters/database/subscriber/module.d.ts.map +1 -1
  38. package/dist/adapters/database/subscriber/module.mjs +9 -5
  39. package/dist/adapters/database/subscriber/module.mjs.map +1 -1
  40. package/dist/adapters/http/adapters/oauth2/authorization/module.mjs +1 -1
  41. package/dist/adapters/http/adapters/oauth2/authorization/module.mjs.map +1 -1
  42. package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.d.ts.map +1 -1
  43. package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.mjs +8 -2
  44. package/dist/adapters/http/adapters/oauth2/grant-types/refresh_token.mjs.map +1 -1
  45. package/dist/adapters/http/constants.d.ts +18 -0
  46. package/dist/adapters/http/constants.d.ts.map +1 -0
  47. package/dist/adapters/http/constants.mjs +23 -0
  48. package/dist/adapters/http/constants.mjs.map +1 -0
  49. package/dist/adapters/http/controllers/entities/client/module.mjs +1 -1
  50. package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts +23 -1
  51. package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts.map +1 -1
  52. package/dist/adapters/http/controllers/entities/identity-provider/module.mjs +86 -47
  53. package/dist/adapters/http/controllers/entities/identity-provider/module.mjs.map +1 -1
  54. package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts +6 -0
  55. package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts.map +1 -1
  56. package/dist/adapters/http/controllers/entities/realm/module.d.ts.map +1 -1
  57. package/dist/adapters/http/controllers/entities/realm/module.mjs +2 -0
  58. package/dist/adapters/http/controllers/entities/realm/module.mjs.map +1 -1
  59. package/dist/adapters/http/controllers/entities/session/module.d.ts +33 -1
  60. package/dist/adapters/http/controllers/entities/session/module.d.ts.map +1 -1
  61. package/dist/adapters/http/controllers/entities/session/module.mjs +74 -0
  62. package/dist/adapters/http/controllers/entities/session/module.mjs.map +1 -1
  63. package/dist/adapters/http/controllers/index.mjs +3 -1
  64. package/dist/adapters/http/controllers/workflows/account/index.d.ts +1 -0
  65. package/dist/adapters/http/controllers/workflows/account/index.d.ts.map +1 -1
  66. package/dist/adapters/http/controllers/workflows/account/module.d.ts +25 -16
  67. package/dist/adapters/http/controllers/workflows/account/module.d.ts.map +1 -1
  68. package/dist/adapters/http/controllers/workflows/account/module.mjs +40 -17
  69. package/dist/adapters/http/controllers/workflows/account/module.mjs.map +1 -1
  70. package/dist/adapters/http/controllers/workflows/account/types.d.ts +33 -0
  71. package/dist/adapters/http/controllers/workflows/account/types.d.ts.map +1 -0
  72. package/dist/adapters/http/controllers/workflows/activate/module.d.ts +8 -4
  73. package/dist/adapters/http/controllers/workflows/activate/module.d.ts.map +1 -1
  74. package/dist/adapters/http/controllers/workflows/activate/module.mjs +7 -9
  75. package/dist/adapters/http/controllers/workflows/activate/module.mjs.map +1 -1
  76. package/dist/adapters/http/controllers/workflows/admin/index.d.ts.map +1 -0
  77. package/dist/adapters/http/controllers/workflows/admin/index.mjs +5 -0
  78. package/dist/adapters/http/controllers/workflows/admin/module.d.ts +30 -0
  79. package/dist/adapters/http/controllers/workflows/admin/module.d.ts.map +1 -0
  80. package/dist/adapters/http/controllers/workflows/admin/module.mjs +88 -0
  81. package/dist/adapters/http/controllers/workflows/admin/module.mjs.map +1 -0
  82. package/dist/adapters/http/controllers/workflows/admin/types.d.ts +14 -0
  83. package/dist/adapters/http/controllers/workflows/admin/types.d.ts.map +1 -0
  84. package/dist/adapters/http/controllers/workflows/auth-console.d.ts +16 -0
  85. package/dist/adapters/http/controllers/workflows/auth-console.d.ts.map +1 -0
  86. package/dist/adapters/http/controllers/workflows/auth-console.mjs +32 -0
  87. package/dist/adapters/http/controllers/workflows/auth-console.mjs.map +1 -0
  88. package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.d.ts +2 -0
  89. package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.d.ts.map +1 -1
  90. package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.mjs +21 -3
  91. package/dist/adapters/http/controllers/workflows/authenticator-challenge/module.mjs.map +1 -1
  92. package/dist/adapters/http/controllers/workflows/authorize/module.d.ts +16 -1
  93. package/dist/adapters/http/controllers/workflows/authorize/module.d.ts.map +1 -1
  94. package/dist/adapters/http/controllers/workflows/authorize/module.mjs +44 -21
  95. package/dist/adapters/http/controllers/workflows/authorize/module.mjs.map +1 -1
  96. package/dist/adapters/http/controllers/workflows/authorize/types.d.ts +5 -0
  97. package/dist/adapters/http/controllers/workflows/authorize/types.d.ts.map +1 -1
  98. package/dist/adapters/http/controllers/workflows/console-login/index.d.ts +3 -0
  99. package/dist/adapters/http/controllers/workflows/console-login/index.d.ts.map +1 -0
  100. package/dist/adapters/http/controllers/workflows/console-login/index.mjs +5 -0
  101. package/dist/adapters/http/controllers/workflows/console-login/module.d.ts +83 -0
  102. package/dist/adapters/http/controllers/workflows/console-login/module.d.ts.map +1 -0
  103. package/dist/adapters/http/controllers/workflows/console-login/module.mjs +230 -0
  104. package/dist/adapters/http/controllers/workflows/console-login/module.mjs.map +1 -0
  105. package/dist/adapters/http/controllers/workflows/console-login/types.d.ts +58 -0
  106. package/dist/adapters/http/controllers/workflows/console-login/types.d.ts.map +1 -0
  107. package/dist/adapters/http/controllers/workflows/index.d.ts +2 -0
  108. package/dist/adapters/http/controllers/workflows/index.d.ts.map +1 -1
  109. package/dist/adapters/http/controllers/workflows/index.mjs +5 -1
  110. package/dist/adapters/http/controllers/workflows/logout/module.d.ts +32 -3
  111. package/dist/adapters/http/controllers/workflows/logout/module.d.ts.map +1 -1
  112. package/dist/adapters/http/controllers/workflows/logout/module.mjs +48 -24
  113. package/dist/adapters/http/controllers/workflows/logout/module.mjs.map +1 -1
  114. package/dist/adapters/http/controllers/workflows/logout/types.d.ts +1 -1
  115. package/dist/adapters/http/controllers/workflows/logout/types.d.ts.map +1 -1
  116. package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts +8 -4
  117. package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts.map +1 -1
  118. package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs +7 -9
  119. package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs.map +1 -1
  120. package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts +8 -4
  121. package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts.map +1 -1
  122. package/dist/adapters/http/controllers/workflows/password-reset/module.mjs +7 -10
  123. package/dist/adapters/http/controllers/workflows/password-reset/module.mjs.map +1 -1
  124. package/dist/adapters/http/controllers/workflows/register/module.d.ts +8 -4
  125. package/dist/adapters/http/controllers/workflows/register/module.d.ts.map +1 -1
  126. package/dist/adapters/http/controllers/workflows/register/module.mjs +7 -9
  127. package/dist/adapters/http/controllers/workflows/register/module.mjs.map +1 -1
  128. package/dist/adapters/http/controllers/workflows/status/module.mjs +1 -1
  129. package/dist/adapters/http/controllers/workflows/token/module.d.ts +45 -2
  130. package/dist/adapters/http/controllers/workflows/token/module.d.ts.map +1 -1
  131. package/dist/adapters/http/controllers/workflows/token/module.mjs +117 -26
  132. package/dist/adapters/http/controllers/workflows/token/module.mjs.map +1 -1
  133. package/dist/adapters/http/cookie/index.d.ts +2 -0
  134. package/dist/adapters/http/cookie/index.d.ts.map +1 -0
  135. package/dist/adapters/http/cookie/index.mjs +5 -0
  136. package/dist/adapters/http/cookie/session.d.ts +35 -0
  137. package/dist/adapters/http/cookie/session.d.ts.map +1 -0
  138. package/dist/adapters/http/cookie/session.mjs +62 -0
  139. package/dist/adapters/http/cookie/session.mjs.map +1 -0
  140. package/dist/adapters/http/index.d.ts +2 -0
  141. package/dist/adapters/http/index.d.ts.map +1 -1
  142. package/dist/adapters/http/index.mjs +20 -16
  143. package/dist/adapters/http/internal-client/index.d.ts +3 -0
  144. package/dist/adapters/http/internal-client/index.d.ts.map +1 -0
  145. package/dist/adapters/http/internal-client/index.mjs +5 -0
  146. package/dist/adapters/http/internal-client/module.d.ts +21 -0
  147. package/dist/adapters/http/internal-client/module.d.ts.map +1 -0
  148. package/dist/adapters/http/{ui/auth-console/http-client.mjs → internal-client/module.mjs} +16 -15
  149. package/dist/adapters/http/internal-client/module.mjs.map +1 -0
  150. package/dist/adapters/http/internal-client/types.d.ts +13 -0
  151. package/dist/adapters/http/internal-client/types.d.ts.map +1 -0
  152. package/dist/adapters/http/middleware/built-in/authorization/index.d.ts +1 -0
  153. package/dist/adapters/http/middleware/built-in/authorization/index.d.ts.map +1 -1
  154. package/dist/adapters/http/middleware/built-in/authorization/index.mjs +2 -1
  155. package/dist/adapters/http/middleware/built-in/authorization/issuance.d.ts +45 -0
  156. package/dist/adapters/http/middleware/built-in/authorization/issuance.d.ts.map +1 -0
  157. package/dist/adapters/http/middleware/built-in/authorization/issuance.mjs +61 -0
  158. package/dist/adapters/http/middleware/built-in/authorization/issuance.mjs.map +1 -0
  159. package/dist/adapters/http/middleware/built-in/authorization/module.d.ts +26 -2
  160. package/dist/adapters/http/middleware/built-in/authorization/module.d.ts.map +1 -1
  161. package/dist/adapters/http/middleware/built-in/authorization/module.mjs +67 -1
  162. package/dist/adapters/http/middleware/built-in/authorization/module.mjs.map +1 -1
  163. package/dist/adapters/http/middleware/built-in/authorization/types.d.ts +21 -1
  164. package/dist/adapters/http/middleware/built-in/authorization/types.d.ts.map +1 -1
  165. package/dist/adapters/http/middleware/built-in/basic.d.ts +2 -2
  166. package/dist/adapters/http/middleware/built-in/basic.d.ts.map +1 -1
  167. package/dist/adapters/http/middleware/built-in/basic.mjs.map +1 -1
  168. package/dist/adapters/http/middleware/built-in/cors.d.ts +8 -2
  169. package/dist/adapters/http/middleware/built-in/cors.d.ts.map +1 -1
  170. package/dist/adapters/http/middleware/built-in/cors.mjs +20 -3
  171. package/dist/adapters/http/middleware/built-in/cors.mjs.map +1 -1
  172. package/dist/adapters/http/middleware/built-in/error.d.ts +2 -2
  173. package/dist/adapters/http/middleware/built-in/error.d.ts.map +1 -1
  174. package/dist/adapters/http/middleware/built-in/error.mjs +10 -1
  175. package/dist/adapters/http/middleware/built-in/error.mjs.map +1 -1
  176. package/dist/adapters/http/middleware/built-in/index.d.ts +1 -4
  177. package/dist/adapters/http/middleware/built-in/index.d.ts.map +1 -1
  178. package/dist/adapters/http/middleware/built-in/index.mjs +3 -4
  179. package/dist/adapters/http/middleware/built-in/internal-http-client.d.ts +17 -0
  180. package/dist/adapters/http/middleware/built-in/internal-http-client.d.ts.map +1 -0
  181. package/dist/adapters/http/middleware/built-in/internal-http-client.mjs +27 -0
  182. package/dist/adapters/http/middleware/built-in/internal-http-client.mjs.map +1 -0
  183. package/dist/adapters/http/middleware/built-in/logger.mjs +1 -1
  184. package/dist/adapters/http/middleware/built-in/logger.mjs.map +1 -1
  185. package/dist/adapters/http/middleware/built-in/prometheus.d.ts +6 -5
  186. package/dist/adapters/http/middleware/built-in/prometheus.d.ts.map +1 -1
  187. package/dist/adapters/http/middleware/built-in/prometheus.mjs +3 -2
  188. package/dist/adapters/http/middleware/built-in/prometheus.mjs.map +1 -1
  189. package/dist/adapters/http/middleware/built-in/rate-limit.d.ts +2 -2
  190. package/dist/adapters/http/middleware/built-in/rate-limit.d.ts.map +1 -1
  191. package/dist/adapters/http/middleware/built-in/rate-limit.mjs +15 -0
  192. package/dist/adapters/http/middleware/built-in/rate-limit.mjs.map +1 -1
  193. package/dist/adapters/http/middleware/index.mjs +3 -4
  194. package/dist/adapters/http/request/constants.d.ts +1 -1
  195. package/dist/adapters/http/request/constants.d.ts.map +1 -1
  196. package/dist/adapters/http/request/constants.mjs +1 -5
  197. package/dist/adapters/http/request/constants.mjs.map +1 -1
  198. package/dist/adapters/http/request/helpers/index.d.ts +1 -1
  199. package/dist/adapters/http/request/helpers/index.d.ts.map +1 -1
  200. package/dist/adapters/http/request/helpers/index.mjs +2 -2
  201. package/dist/adapters/http/request/helpers/locale.d.ts +2 -1
  202. package/dist/adapters/http/request/helpers/locale.d.ts.map +1 -1
  203. package/dist/adapters/http/request/helpers/locale.mjs +1 -1
  204. package/dist/adapters/http/request/helpers/locale.mjs.map +1 -1
  205. package/dist/adapters/http/request/helpers/same-origin.d.ts +38 -0
  206. package/dist/adapters/http/request/helpers/same-origin.d.ts.map +1 -0
  207. package/dist/adapters/http/request/helpers/same-origin.mjs +68 -0
  208. package/dist/adapters/http/request/helpers/same-origin.mjs.map +1 -0
  209. package/dist/adapters/http/request/index.mjs +2 -2
  210. package/dist/adapters/http/request/permission/module.mjs +1 -1
  211. package/dist/adapters/http/request/permission/module.mjs.map +1 -1
  212. package/dist/adapters/http/request/types.d.ts +1 -2
  213. package/dist/adapters/http/request/types.d.ts.map +1 -1
  214. package/dist/adapters/shared/ldap/module.d.ts.map +1 -1
  215. package/dist/adapters/shared/ldap/module.mjs +4 -1
  216. package/dist/adapters/shared/ldap/module.mjs.map +1 -1
  217. package/dist/app/builder.d.ts +4 -4
  218. package/dist/app/builder.d.ts.map +1 -1
  219. package/dist/app/builder.mjs +7 -4
  220. package/dist/app/builder.mjs.map +1 -1
  221. package/dist/app/factory.d.ts +10 -0
  222. package/dist/app/factory.d.ts.map +1 -1
  223. package/dist/app/factory.mjs +26 -2
  224. package/dist/app/factory.mjs.map +1 -1
  225. package/dist/app/index.mjs +17 -19
  226. package/dist/app/modules/authentication/module.d.ts.map +1 -1
  227. package/dist/app/modules/authentication/module.mjs +15 -2
  228. package/dist/app/modules/authentication/module.mjs.map +1 -1
  229. package/dist/app/modules/authentication/repositories/session.d.ts +4 -1
  230. package/dist/app/modules/authentication/repositories/session.d.ts.map +1 -1
  231. package/dist/app/modules/authentication/repositories/session.mjs +20 -3
  232. package/dist/app/modules/authentication/repositories/session.mjs.map +1 -1
  233. package/dist/app/modules/components/index.d.ts +1 -0
  234. package/dist/app/modules/components/index.d.ts.map +1 -1
  235. package/dist/app/modules/components/module.d.ts +3 -1
  236. package/dist/app/modules/components/module.d.ts.map +1 -1
  237. package/dist/app/modules/components/module.mjs +26 -7
  238. package/dist/app/modules/components/module.mjs.map +1 -1
  239. package/dist/app/modules/components/types.d.ts +11 -0
  240. package/dist/app/modules/components/types.d.ts.map +1 -0
  241. package/dist/app/modules/config/app-origins.d.ts +10 -0
  242. package/dist/app/modules/config/app-origins.d.ts.map +1 -0
  243. package/dist/app/modules/config/app-origins.mjs +21 -0
  244. package/dist/app/modules/config/app-origins.mjs.map +1 -0
  245. package/dist/app/modules/config/constants.d.ts +23 -50
  246. package/dist/app/modules/config/constants.d.ts.map +1 -1
  247. package/dist/app/modules/config/constants.mjs +34 -51
  248. package/dist/app/modules/config/constants.mjs.map +1 -1
  249. package/dist/app/modules/config/index.d.ts +2 -3
  250. package/dist/app/modules/config/index.d.ts.map +1 -1
  251. package/dist/app/modules/config/index.mjs +4 -8
  252. package/dist/app/modules/config/module.d.ts +2 -2
  253. package/dist/app/modules/config/module.d.ts.map +1 -1
  254. package/dist/app/modules/config/module.mjs +1 -1
  255. package/dist/app/modules/config/module.mjs.map +1 -1
  256. package/dist/app/modules/config/read.d.ts +29 -0
  257. package/dist/app/modules/config/read.d.ts.map +1 -0
  258. package/dist/app/modules/config/read.mjs +65 -0
  259. package/dist/app/modules/config/read.mjs.map +1 -0
  260. package/dist/app/modules/config/types.d.ts +30 -397
  261. package/dist/app/modules/config/types.d.ts.map +1 -1
  262. package/dist/app/modules/config/validator.d.ts.map +1 -1
  263. package/dist/app/modules/config/validator.mjs +3 -87
  264. package/dist/app/modules/config/validator.mjs.map +1 -1
  265. package/dist/app/modules/database/index.d.ts +1 -0
  266. package/dist/app/modules/database/index.d.ts.map +1 -1
  267. package/dist/app/modules/database/index.mjs +2 -1
  268. package/dist/app/modules/database/migration.d.ts +33 -0
  269. package/dist/app/modules/database/migration.d.ts.map +1 -0
  270. package/dist/app/modules/database/migration.mjs +52 -0
  271. package/dist/app/modules/database/migration.mjs.map +1 -0
  272. package/dist/app/modules/database/module.d.ts.map +1 -1
  273. package/dist/app/modules/database/module.mjs +12 -6
  274. package/dist/app/modules/database/module.mjs.map +1 -1
  275. package/dist/app/modules/database/repositories/client/repository.d.ts +6 -1
  276. package/dist/app/modules/database/repositories/client/repository.d.ts.map +1 -1
  277. package/dist/app/modules/database/repositories/client/repository.mjs +21 -4
  278. package/dist/app/modules/database/repositories/client/repository.mjs.map +1 -1
  279. package/dist/app/modules/database/repositories/event/repository.d.ts +29 -2
  280. package/dist/app/modules/database/repositories/event/repository.d.ts.map +1 -1
  281. package/dist/app/modules/database/repositories/event/repository.mjs +42 -24
  282. package/dist/app/modules/database/repositories/event/repository.mjs.map +1 -1
  283. package/dist/app/modules/database/repositories/helpers.d.ts +24 -1
  284. package/dist/app/modules/database/repositories/helpers.d.ts.map +1 -1
  285. package/dist/app/modules/database/repositories/helpers.mjs +38 -1
  286. package/dist/app/modules/database/repositories/helpers.mjs.map +1 -1
  287. package/dist/app/modules/database/repositories/identity-provider/repository.d.ts +3 -1
  288. package/dist/app/modules/database/repositories/identity-provider/repository.d.ts.map +1 -1
  289. package/dist/app/modules/database/repositories/identity-provider/repository.mjs +3 -3
  290. package/dist/app/modules/database/repositories/identity-provider/repository.mjs.map +1 -1
  291. package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs +4 -2
  292. package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs.map +1 -1
  293. package/dist/app/modules/database/repositories/key/repository.mjs +1 -1
  294. package/dist/app/modules/database/repositories/permission/repository.mjs +1 -1
  295. package/dist/app/modules/database/repositories/policy/repository.mjs +1 -1
  296. package/dist/app/modules/database/repositories/role/repository.mjs +1 -1
  297. package/dist/app/modules/database/repositories/scope/repository.mjs +1 -1
  298. package/dist/app/modules/database/repositories/trust-anchor/repository.mjs +1 -1
  299. package/dist/app/modules/database/repositories/user/repository.d.ts +7 -2
  300. package/dist/app/modules/database/repositories/user/repository.d.ts.map +1 -1
  301. package/dist/app/modules/database/repositories/user/repository.mjs +21 -4
  302. package/dist/app/modules/database/repositories/user/repository.mjs.map +1 -1
  303. package/dist/app/modules/http/constants.d.ts +3 -1
  304. package/dist/app/modules/http/constants.d.ts.map +1 -1
  305. package/dist/app/modules/http/constants.mjs +3 -2
  306. package/dist/app/modules/http/constants.mjs.map +1 -1
  307. package/dist/app/modules/http/module.d.ts +30 -9
  308. package/dist/app/modules/http/module.d.ts.map +1 -1
  309. package/dist/app/modules/http/module.mjs +31 -33
  310. package/dist/app/modules/http/module.mjs.map +1 -1
  311. package/dist/app/modules/http/modules/controller.d.ts +4 -3
  312. package/dist/app/modules/http/modules/controller.d.ts.map +1 -1
  313. package/dist/app/modules/http/modules/controller.mjs +70 -38
  314. package/dist/app/modules/http/modules/controller.mjs.map +1 -1
  315. package/dist/app/modules/http/modules/middleware.d.ts +13 -22
  316. package/dist/app/modules/http/modules/middleware.d.ts.map +1 -1
  317. package/dist/app/modules/http/modules/middleware.mjs +20 -36
  318. package/dist/app/modules/http/modules/middleware.mjs.map +1 -1
  319. package/dist/app/modules/identity/module.mjs +4 -4
  320. package/dist/app/modules/identity/repositories/client.mjs +4 -2
  321. package/dist/app/modules/identity/repositories/client.mjs.map +1 -1
  322. package/dist/app/modules/identity/repositories/user.mjs +4 -2
  323. package/dist/app/modules/identity/repositories/user.mjs.map +1 -1
  324. package/dist/app/modules/index.mjs +21 -23
  325. package/dist/app/modules/logger/module.mjs +1 -1
  326. package/dist/app/modules/logger/module.mjs.map +1 -1
  327. package/dist/app/modules/mail/module.d.ts.map +1 -1
  328. package/dist/app/modules/mail/module.mjs.map +1 -1
  329. package/dist/app/modules/oauth2/constants.d.ts +3 -1
  330. package/dist/app/modules/oauth2/constants.d.ts.map +1 -1
  331. package/dist/app/modules/oauth2/constants.mjs +2 -0
  332. package/dist/app/modules/oauth2/constants.mjs.map +1 -1
  333. package/dist/app/modules/oauth2/module.d.ts.map +1 -1
  334. package/dist/app/modules/oauth2/module.mjs +14 -4
  335. package/dist/app/modules/oauth2/module.mjs.map +1 -1
  336. package/dist/app/modules/oauth2/repositories/client/repository.mjs +4 -2
  337. package/dist/app/modules/oauth2/repositories/client/repository.mjs.map +1 -1
  338. package/dist/app/modules/oauth2/repositories/consent/repository.d.ts.map +1 -1
  339. package/dist/app/modules/oauth2/repositories/consent/repository.mjs +3 -2
  340. package/dist/app/modules/oauth2/repositories/consent/repository.mjs.map +1 -1
  341. package/dist/app/modules/oauth2/repositories/console-login/index.d.ts +2 -0
  342. package/dist/app/modules/oauth2/repositories/console-login/index.d.ts.map +1 -0
  343. package/dist/app/modules/oauth2/repositories/console-login/index.mjs +5 -0
  344. package/dist/app/modules/oauth2/repositories/console-login/store.d.ts +19 -0
  345. package/dist/app/modules/oauth2/repositories/console-login/store.d.ts.map +1 -0
  346. package/dist/app/modules/oauth2/repositories/console-login/store.mjs +47 -0
  347. package/dist/app/modules/oauth2/repositories/console-login/store.mjs.map +1 -0
  348. package/dist/app/modules/oauth2/repositories/constants.d.ts +2 -0
  349. package/dist/app/modules/oauth2/repositories/constants.d.ts.map +1 -1
  350. package/dist/app/modules/oauth2/repositories/constants.mjs +2 -0
  351. package/dist/app/modules/oauth2/repositories/constants.mjs.map +1 -1
  352. package/dist/app/modules/oauth2/repositories/federated-login/index.d.ts +2 -0
  353. package/dist/app/modules/oauth2/repositories/federated-login/index.d.ts.map +1 -0
  354. package/dist/app/modules/oauth2/repositories/federated-login/index.mjs +5 -0
  355. package/dist/app/modules/oauth2/repositories/federated-login/store.d.ts +9 -0
  356. package/dist/app/modules/oauth2/repositories/federated-login/store.d.ts.map +1 -0
  357. package/dist/app/modules/oauth2/repositories/federated-login/store.mjs +33 -0
  358. package/dist/app/modules/oauth2/repositories/federated-login/store.mjs.map +1 -0
  359. package/dist/app/modules/oauth2/repositories/index.d.ts +2 -0
  360. package/dist/app/modules/oauth2/repositories/index.d.ts.map +1 -1
  361. package/dist/app/modules/oauth2/repositories/index.mjs +5 -1
  362. package/dist/app/modules/oauth2/repositories/session-token/repository.d.ts +2 -2
  363. package/dist/app/modules/oauth2/repositories/session-token/repository.d.ts.map +1 -1
  364. package/dist/app/modules/oauth2/repositories/session-token/repository.mjs +5 -3
  365. package/dist/app/modules/oauth2/repositories/session-token/repository.mjs.map +1 -1
  366. package/dist/app/modules/provisioning/module.d.ts.map +1 -1
  367. package/dist/app/modules/provisioning/module.mjs +5 -6
  368. package/dist/app/modules/provisioning/module.mjs.map +1 -1
  369. package/dist/app/modules/provisioning/sources/composite/module.d.ts.map +1 -1
  370. package/dist/app/modules/provisioning/sources/composite/module.mjs +2 -1
  371. package/dist/app/modules/provisioning/sources/composite/module.mjs.map +1 -1
  372. package/dist/app/modules/provisioning/sources/default/module.d.ts.map +1 -1
  373. package/dist/app/modules/provisioning/sources/default/module.mjs +2 -1
  374. package/dist/app/modules/provisioning/sources/default/module.mjs.map +1 -1
  375. package/dist/app/modules/runtime/module.d.ts.map +1 -1
  376. package/dist/app/modules/runtime/module.mjs +2 -1
  377. package/dist/app/modules/runtime/module.mjs.map +1 -1
  378. package/dist/app/types.d.ts +16 -0
  379. package/dist/app/types.d.ts.map +1 -1
  380. package/dist/cli/commands/config.d.ts +40 -0
  381. package/dist/cli/commands/config.d.ts.map +1 -0
  382. package/dist/cli/commands/config.mjs +65 -0
  383. package/dist/cli/commands/config.mjs.map +1 -0
  384. package/dist/cli/commands/healthcheck.d.ts +3 -2
  385. package/dist/cli/commands/healthcheck.d.ts.map +1 -1
  386. package/dist/cli/commands/healthcheck.mjs +6 -3
  387. package/dist/cli/commands/healthcheck.mjs.map +1 -1
  388. package/dist/cli/commands/index.d.ts +3 -0
  389. package/dist/cli/commands/index.d.ts.map +1 -1
  390. package/dist/cli/commands/index.mjs +3 -1
  391. package/dist/cli/commands/migration.d.ts +3 -10
  392. package/dist/cli/commands/migration.d.ts.map +1 -1
  393. package/dist/cli/commands/migration.mjs +17 -9
  394. package/dist/cli/commands/migration.mjs.map +1 -1
  395. package/dist/cli/commands/shutdown.d.ts +16 -0
  396. package/dist/cli/commands/shutdown.d.ts.map +1 -0
  397. package/dist/cli/commands/shutdown.mjs +41 -0
  398. package/dist/cli/commands/shutdown.mjs.map +1 -0
  399. package/dist/cli/commands/start.d.ts +3 -2
  400. package/dist/cli/commands/start.d.ts.map +1 -1
  401. package/dist/cli/commands/start.mjs +3 -21
  402. package/dist/cli/commands/start.mjs.map +1 -1
  403. package/dist/cli/commands/types.d.ts.map +1 -0
  404. package/dist/cli/index.d.ts +8 -0
  405. package/dist/cli/index.d.ts.map +1 -1
  406. package/dist/cli/index.mjs.map +1 -1
  407. package/dist/cli/module.d.ts +0 -2
  408. package/dist/cli/module.d.ts.map +1 -1
  409. package/dist/cli/module.mjs +4 -3
  410. package/dist/cli/module.mjs.map +1 -1
  411. package/dist/components/oauth2-cleaner/module.d.ts +2 -2
  412. package/dist/components/oauth2-cleaner/module.d.ts.map +1 -1
  413. package/dist/components/oauth2-cleaner/module.mjs +10 -7
  414. package/dist/components/oauth2-cleaner/module.mjs.map +1 -1
  415. package/dist/core/authentication/index.mjs +2 -1
  416. package/dist/core/authentication/session/constants.d.ts +10 -0
  417. package/dist/core/authentication/session/constants.d.ts.map +1 -0
  418. package/dist/core/authentication/session/constants.mjs +16 -0
  419. package/dist/core/authentication/session/constants.mjs.map +1 -0
  420. package/dist/core/authentication/session/index.d.ts +1 -0
  421. package/dist/core/authentication/session/index.d.ts.map +1 -1
  422. package/dist/core/authentication/session/index.mjs +2 -1
  423. package/dist/core/authentication/session/module.d.ts +2 -1
  424. package/dist/core/authentication/session/module.d.ts.map +1 -1
  425. package/dist/core/authentication/session/module.mjs +7 -1
  426. package/dist/core/authentication/session/module.mjs.map +1 -1
  427. package/dist/core/authentication/session/types.d.ts +70 -1
  428. package/dist/core/authentication/session/types.d.ts.map +1 -1
  429. package/dist/core/authentication/session/types.mjs.map +1 -1
  430. package/dist/core/entities/client/schema.d.ts.map +1 -1
  431. package/dist/core/entities/client/schema.mjs +1 -2
  432. package/dist/core/entities/client/schema.mjs.map +1 -1
  433. package/dist/core/entities/client/service.d.ts.map +1 -1
  434. package/dist/core/entities/client/service.mjs +15 -1
  435. package/dist/core/entities/client/service.mjs.map +1 -1
  436. package/dist/core/entities/client/system-clients.d.ts +0 -5
  437. package/dist/core/entities/client/system-clients.d.ts.map +1 -1
  438. package/dist/core/entities/client/system-clients.mjs +0 -6
  439. package/dist/core/entities/client/system-clients.mjs.map +1 -1
  440. package/dist/core/entities/client/types.d.ts +12 -0
  441. package/dist/core/entities/client/types.d.ts.map +1 -1
  442. package/dist/core/entities/client-permission/service.mjs +1 -1
  443. package/dist/core/entities/client-permission/service.mjs.map +1 -1
  444. package/dist/core/entities/event/constants.d.ts +1 -6
  445. package/dist/core/entities/event/constants.d.ts.map +1 -1
  446. package/dist/core/entities/event/constants.mjs +1 -5
  447. package/dist/core/entities/event/constants.mjs.map +1 -1
  448. package/dist/core/entities/event/entity-event-handler.d.ts.map +1 -1
  449. package/dist/core/entities/event/entity-event-handler.mjs +17 -3
  450. package/dist/core/entities/event/entity-event-handler.mjs.map +1 -1
  451. package/dist/core/entities/event/service.d.ts.map +1 -1
  452. package/dist/core/entities/event/service.mjs +3 -3
  453. package/dist/core/entities/event/service.mjs.map +1 -1
  454. package/dist/core/entities/event/types.d.ts +15 -1
  455. package/dist/core/entities/event/types.d.ts.map +1 -1
  456. package/dist/core/entities/identity-provider/types.d.ts +9 -1
  457. package/dist/core/entities/identity-provider/types.d.ts.map +1 -1
  458. package/dist/core/entities/permission/service.mjs +1 -2
  459. package/dist/core/entities/permission/service.mjs.map +1 -1
  460. package/dist/core/entities/role-permission/service.mjs +1 -1
  461. package/dist/core/entities/role-permission/service.mjs.map +1 -1
  462. package/dist/core/entities/session/service.d.ts +13 -1
  463. package/dist/core/entities/session/service.d.ts.map +1 -1
  464. package/dist/core/entities/session/service.mjs +19 -16
  465. package/dist/core/entities/session/service.mjs.map +1 -1
  466. package/dist/core/entities/user/schema.d.ts.map +1 -1
  467. package/dist/core/entities/user/schema.mjs +1 -0
  468. package/dist/core/entities/user/schema.mjs.map +1 -1
  469. package/dist/core/entities/user/service.d.ts.map +1 -1
  470. package/dist/core/entities/user/service.mjs +21 -1
  471. package/dist/core/entities/user/service.mjs.map +1 -1
  472. package/dist/core/entities/user/types.d.ts +12 -0
  473. package/dist/core/entities/user/types.d.ts.map +1 -1
  474. package/dist/core/entities/user-permission/service.mjs +1 -1
  475. package/dist/core/entities/user-permission/service.mjs.map +1 -1
  476. package/dist/core/identity/index.mjs +2 -1
  477. package/dist/core/identity/permission/junction-grant.mjs +1 -1
  478. package/dist/core/identity/permission/junction-grant.mjs.map +1 -1
  479. package/dist/core/identity/provider/account/module.mjs +2 -2
  480. package/dist/core/identity/provider/account/module.mjs.map +1 -1
  481. package/dist/core/identity/provider/authentication/index.mjs +2 -1
  482. package/dist/core/identity/provider/authentication/protocols/index.mjs +2 -1
  483. package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.d.ts +46 -0
  484. package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.d.ts.map +1 -0
  485. package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.mjs +89 -0
  486. package/dist/core/identity/provider/authentication/protocols/oauth2/assurance.mjs.map +1 -0
  487. package/dist/core/identity/provider/authentication/protocols/oauth2/index.d.ts +1 -0
  488. package/dist/core/identity/provider/authentication/protocols/oauth2/index.d.ts.map +1 -1
  489. package/dist/core/identity/provider/authentication/protocols/oauth2/index.mjs +2 -1
  490. package/dist/core/identity/provider/authentication/protocols/oauth2/module.d.ts.map +1 -1
  491. package/dist/core/identity/provider/authentication/protocols/oauth2/module.mjs +9 -2
  492. package/dist/core/identity/provider/authentication/protocols/oauth2/module.mjs.map +1 -1
  493. package/dist/core/identity/provider/index.mjs +2 -1
  494. package/dist/core/identity/registration/service.d.ts.map +1 -1
  495. package/dist/core/identity/registration/service.mjs +2 -1
  496. package/dist/core/identity/registration/service.mjs.map +1 -1
  497. package/dist/core/index.mjs +14 -4
  498. package/dist/core/oauth2/authorization/helpers.d.ts +14 -0
  499. package/dist/core/oauth2/authorization/helpers.d.ts.map +1 -1
  500. package/dist/core/oauth2/authorization/helpers.mjs +15 -2
  501. package/dist/core/oauth2/authorization/helpers.mjs.map +1 -1
  502. package/dist/core/oauth2/authorization/index.mjs +2 -2
  503. package/dist/core/oauth2/authorization/module.d.ts.map +1 -1
  504. package/dist/core/oauth2/authorization/module.mjs +6 -4
  505. package/dist/core/oauth2/authorization/module.mjs.map +1 -1
  506. package/dist/core/oauth2/authorization/state/types.d.ts +8 -0
  507. package/dist/core/oauth2/authorization/state/types.d.ts.map +1 -1
  508. package/dist/core/oauth2/backchannel-logout/constants.d.ts +16 -0
  509. package/dist/core/oauth2/backchannel-logout/constants.d.ts.map +1 -0
  510. package/dist/core/oauth2/backchannel-logout/constants.mjs +20 -0
  511. package/dist/core/oauth2/backchannel-logout/constants.mjs.map +1 -0
  512. package/dist/core/oauth2/backchannel-logout/index.d.ts +4 -0
  513. package/dist/core/oauth2/backchannel-logout/index.d.ts.map +1 -0
  514. package/dist/core/oauth2/backchannel-logout/index.mjs +6 -0
  515. package/dist/core/oauth2/backchannel-logout/module.d.ts +26 -0
  516. package/dist/core/oauth2/backchannel-logout/module.d.ts.map +1 -0
  517. package/dist/core/oauth2/backchannel-logout/module.mjs +78 -0
  518. package/dist/core/oauth2/backchannel-logout/module.mjs.map +1 -0
  519. package/dist/core/oauth2/backchannel-logout/types.d.ts +29 -0
  520. package/dist/core/oauth2/backchannel-logout/types.d.ts.map +1 -0
  521. package/dist/core/oauth2/console-login/constants.d.ts +19 -0
  522. package/dist/core/oauth2/console-login/constants.d.ts.map +1 -0
  523. package/dist/core/oauth2/console-login/constants.mjs +24 -0
  524. package/dist/core/oauth2/console-login/constants.mjs.map +1 -0
  525. package/dist/core/oauth2/console-login/index.d.ts +3 -0
  526. package/dist/core/oauth2/console-login/index.d.ts.map +1 -0
  527. package/dist/core/oauth2/console-login/index.mjs +5 -0
  528. package/dist/core/oauth2/console-login/types.d.ts +53 -0
  529. package/dist/core/oauth2/console-login/types.d.ts.map +1 -0
  530. package/dist/core/oauth2/end-session/service.mjs +1 -1
  531. package/dist/core/oauth2/end-session/service.mjs.map +1 -1
  532. package/dist/core/oauth2/federated-login/constants.d.ts +22 -0
  533. package/dist/core/oauth2/federated-login/constants.d.ts.map +1 -0
  534. package/dist/core/oauth2/federated-login/constants.mjs +27 -0
  535. package/dist/core/oauth2/federated-login/constants.mjs.map +1 -0
  536. package/dist/core/oauth2/federated-login/index.d.ts +1 -0
  537. package/dist/core/oauth2/federated-login/index.d.ts.map +1 -1
  538. package/dist/core/oauth2/federated-login/index.mjs +2 -1
  539. package/dist/core/oauth2/federated-login/module.d.ts +12 -3
  540. package/dist/core/oauth2/federated-login/module.d.ts.map +1 -1
  541. package/dist/core/oauth2/federated-login/module.mjs +98 -42
  542. package/dist/core/oauth2/federated-login/module.mjs.map +1 -1
  543. package/dist/core/oauth2/federated-login/types.d.ts +82 -24
  544. package/dist/core/oauth2/federated-login/types.d.ts.map +1 -1
  545. package/dist/core/oauth2/federated-login/types.mjs +5 -0
  546. package/dist/core/oauth2/federated-login/types.mjs.map +1 -1
  547. package/dist/core/oauth2/grant-types/authorize.mjs +1 -1
  548. package/dist/core/oauth2/grant-types/client-credentials.mjs +1 -1
  549. package/dist/core/oauth2/grant-types/identity.mjs +1 -1
  550. package/dist/core/oauth2/grant-types/password.mjs +1 -1
  551. package/dist/core/oauth2/grant-types/refresh-token.mjs +1 -1
  552. package/dist/core/oauth2/index.d.ts +4 -0
  553. package/dist/core/oauth2/index.d.ts.map +1 -1
  554. package/dist/core/oauth2/index.mjs +15 -4
  555. package/dist/core/oauth2/introspection/index.d.ts +3 -0
  556. package/dist/core/oauth2/introspection/index.d.ts.map +1 -0
  557. package/dist/core/oauth2/introspection/index.mjs +5 -0
  558. package/dist/core/oauth2/introspection/module.d.ts +14 -0
  559. package/dist/core/oauth2/introspection/module.d.ts.map +1 -0
  560. package/dist/core/oauth2/introspection/module.mjs +49 -0
  561. package/dist/core/oauth2/introspection/module.mjs.map +1 -0
  562. package/dist/core/oauth2/introspection/types.d.ts +45 -0
  563. package/dist/core/oauth2/introspection/types.d.ts.map +1 -0
  564. package/dist/core/oauth2/introspection/types.mjs +4 -0
  565. package/dist/core/oauth2/openid/claims.d.ts +20 -2
  566. package/dist/core/oauth2/openid/claims.d.ts.map +1 -1
  567. package/dist/core/oauth2/openid/claims.mjs +18 -4
  568. package/dist/core/oauth2/openid/claims.mjs.map +1 -1
  569. package/dist/core/oauth2/session-credential/constants.d.ts +30 -0
  570. package/dist/core/oauth2/session-credential/constants.d.ts.map +1 -0
  571. package/dist/core/oauth2/session-credential/constants.mjs +34 -0
  572. package/dist/core/oauth2/session-credential/constants.mjs.map +1 -0
  573. package/dist/core/oauth2/session-credential/index.d.ts +3 -0
  574. package/dist/core/oauth2/session-credential/index.d.ts.map +1 -0
  575. package/dist/core/oauth2/session-credential/index.mjs +6 -0
  576. package/dist/core/oauth2/session-credential/module.d.ts +31 -0
  577. package/dist/core/oauth2/session-credential/module.d.ts.map +1 -0
  578. package/dist/core/oauth2/session-credential/module.mjs +43 -0
  579. package/dist/core/oauth2/session-credential/module.mjs.map +1 -0
  580. package/dist/core/oauth2/session-token/constants.d.ts +10 -0
  581. package/dist/core/oauth2/session-token/constants.d.ts.map +1 -0
  582. package/dist/core/oauth2/session-token/constants.mjs +16 -0
  583. package/dist/core/oauth2/session-token/constants.mjs.map +1 -0
  584. package/dist/core/oauth2/session-token/index.d.ts +1 -0
  585. package/dist/core/oauth2/session-token/index.d.ts.map +1 -1
  586. package/dist/core/oauth2/session-token/index.mjs +2 -1
  587. package/dist/core/oauth2/session-token/types.d.ts +13 -2
  588. package/dist/core/oauth2/session-token/types.d.ts.map +1 -1
  589. package/dist/core/oauth2/token/verifier/module.d.ts.map +1 -1
  590. package/dist/core/oauth2/token/verifier/module.mjs +3 -3
  591. package/dist/core/oauth2/token/verifier/module.mjs.map +1 -1
  592. package/dist/core/provisioning/merge/module.mjs +5 -3
  593. package/dist/core/provisioning/merge/module.mjs.map +1 -1
  594. package/dist/core/query/module.mjs +1 -1
  595. package/dist/core/query/module.mjs.map +1 -1
  596. package/dist/core/security/policy/evaluator.mjs +1 -1
  597. package/dist/core/security/policy/evaluator.mjs.map +1 -1
  598. package/dist/index.mjs +62 -59
  599. package/dist/path.mjs +1 -1
  600. package/dist/swagger.json +573 -163
  601. package/dist/utils/error.d.ts +6 -0
  602. package/dist/utils/error.d.ts.map +1 -1
  603. package/dist/utils/error.mjs +6 -2
  604. package/dist/utils/error.mjs.map +1 -1
  605. package/dist/utils/index.mjs +2 -2
  606. package/package.json +32 -26
  607. package/dist/adapters/http/middleware/built-in/assets.d.ts +0 -11
  608. package/dist/adapters/http/middleware/built-in/assets.d.ts.map +0 -1
  609. package/dist/adapters/http/middleware/built-in/assets.mjs +0 -91
  610. package/dist/adapters/http/middleware/built-in/assets.mjs.map +0 -1
  611. package/dist/adapters/http/middleware/built-in/theme.d.ts +0 -15
  612. package/dist/adapters/http/middleware/built-in/theme.d.ts.map +0 -1
  613. package/dist/adapters/http/middleware/built-in/theme.mjs +0 -27
  614. package/dist/adapters/http/middleware/built-in/theme.mjs.map +0 -1
  615. package/dist/adapters/http/middleware/built-in/types.d.ts +0 -14
  616. package/dist/adapters/http/middleware/built-in/types.d.ts.map +0 -1
  617. package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts +0 -15
  618. package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts.map +0 -1
  619. package/dist/adapters/http/middleware/built-in/ui-http-client.mjs +0 -25
  620. package/dist/adapters/http/middleware/built-in/ui-http-client.mjs.map +0 -1
  621. package/dist/adapters/http/request/helpers/redirect.d.ts +0 -14
  622. package/dist/adapters/http/request/helpers/redirect.d.ts.map +0 -1
  623. package/dist/adapters/http/request/helpers/redirect.mjs +0 -36
  624. package/dist/adapters/http/request/helpers/redirect.mjs.map +0 -1
  625. package/dist/adapters/http/ui/account-console/index.d.ts +0 -4
  626. package/dist/adapters/http/ui/account-console/index.d.ts.map +0 -1
  627. package/dist/adapters/http/ui/account-console/index.mjs +0 -6
  628. package/dist/adapters/http/ui/account-console/module.d.ts +0 -28
  629. package/dist/adapters/http/ui/account-console/module.d.ts.map +0 -1
  630. package/dist/adapters/http/ui/account-console/module.mjs +0 -80
  631. package/dist/adapters/http/ui/account-console/module.mjs.map +0 -1
  632. package/dist/adapters/http/ui/account-console/ref.d.ts +0 -30
  633. package/dist/adapters/http/ui/account-console/ref.d.ts.map +0 -1
  634. package/dist/adapters/http/ui/account-console/ref.mjs +0 -50
  635. package/dist/adapters/http/ui/account-console/ref.mjs.map +0 -1
  636. package/dist/adapters/http/ui/account-console/types.d.ts +0 -11
  637. package/dist/adapters/http/ui/account-console/types.d.ts.map +0 -1
  638. package/dist/adapters/http/ui/auth-console/http-client.d.ts +0 -22
  639. package/dist/adapters/http/ui/auth-console/http-client.d.ts.map +0 -1
  640. package/dist/adapters/http/ui/auth-console/http-client.mjs.map +0 -1
  641. package/dist/adapters/http/ui/auth-console/index.d.ts +0 -6
  642. package/dist/adapters/http/ui/auth-console/index.d.ts.map +0 -1
  643. package/dist/adapters/http/ui/auth-console/index.mjs +0 -8
  644. package/dist/adapters/http/ui/auth-console/module.d.ts +0 -4
  645. package/dist/adapters/http/ui/auth-console/module.d.ts.map +0 -1
  646. package/dist/adapters/http/ui/auth-console/module.mjs +0 -73
  647. package/dist/adapters/http/ui/auth-console/module.mjs.map +0 -1
  648. package/dist/adapters/http/ui/auth-console/resolve.d.ts +0 -21
  649. package/dist/adapters/http/ui/auth-console/resolve.d.ts.map +0 -1
  650. package/dist/adapters/http/ui/auth-console/resolve.mjs +0 -53
  651. package/dist/adapters/http/ui/auth-console/resolve.mjs.map +0 -1
  652. package/dist/adapters/http/ui/auth-console/serve.d.ts +0 -9
  653. package/dist/adapters/http/ui/auth-console/serve.d.ts.map +0 -1
  654. package/dist/adapters/http/ui/auth-console/serve.mjs +0 -35
  655. package/dist/adapters/http/ui/auth-console/serve.mjs.map +0 -1
  656. package/dist/adapters/http/ui/auth-console/types.d.ts +0 -26
  657. package/dist/adapters/http/ui/auth-console/types.d.ts.map +0 -1
  658. package/dist/adapters/http/ui/console-packages/index.d.ts.map +0 -1
  659. package/dist/adapters/http/ui/console-packages/index.mjs +0 -5
  660. package/dist/adapters/http/ui/console-packages/module.d.ts +0 -33
  661. package/dist/adapters/http/ui/console-packages/module.d.ts.map +0 -1
  662. package/dist/adapters/http/ui/console-packages/module.mjs +0 -70
  663. package/dist/adapters/http/ui/console-packages/module.mjs.map +0 -1
  664. package/dist/adapters/http/ui/console-packages/types.d.ts +0 -12
  665. package/dist/adapters/http/ui/console-packages/types.d.ts.map +0 -1
  666. package/dist/adapters/http/ui/index.d.ts +0 -6
  667. package/dist/adapters/http/ui/index.d.ts.map +0 -1
  668. package/dist/adapters/http/ui/index.mjs +0 -25
  669. package/dist/adapters/http/ui/shared/html.d.ts +0 -76
  670. package/dist/adapters/http/ui/shared/html.d.ts.map +0 -1
  671. package/dist/adapters/http/ui/shared/html.mjs +0 -104
  672. package/dist/adapters/http/ui/shared/html.mjs.map +0 -1
  673. package/dist/adapters/http/ui/shared/index.d.ts +0 -2
  674. package/dist/adapters/http/ui/shared/index.d.ts.map +0 -1
  675. package/dist/adapters/http/ui/shared/index.mjs +0 -5
  676. package/dist/adapters/http/ui/theme/apply.d.ts +0 -12
  677. package/dist/adapters/http/ui/theme/apply.d.ts.map +0 -1
  678. package/dist/adapters/http/ui/theme/apply.mjs +0 -29
  679. package/dist/adapters/http/ui/theme/apply.mjs.map +0 -1
  680. package/dist/adapters/http/ui/theme/assets.d.ts +0 -20
  681. package/dist/adapters/http/ui/theme/assets.d.ts.map +0 -1
  682. package/dist/adapters/http/ui/theme/assets.mjs +0 -86
  683. package/dist/adapters/http/ui/theme/assets.mjs.map +0 -1
  684. package/dist/adapters/http/ui/theme/constants.d.ts +0 -16
  685. package/dist/adapters/http/ui/theme/constants.d.ts.map +0 -1
  686. package/dist/adapters/http/ui/theme/constants.mjs +0 -20
  687. package/dist/adapters/http/ui/theme/constants.mjs.map +0 -1
  688. package/dist/adapters/http/ui/theme/contract/constants.d.ts +0 -120
  689. package/dist/adapters/http/ui/theme/contract/constants.d.ts.map +0 -1
  690. package/dist/adapters/http/ui/theme/contract/constants.mjs +0 -136
  691. package/dist/adapters/http/ui/theme/contract/constants.mjs.map +0 -1
  692. package/dist/adapters/http/ui/theme/contract/head.d.ts +0 -12
  693. package/dist/adapters/http/ui/theme/contract/head.d.ts.map +0 -1
  694. package/dist/adapters/http/ui/theme/contract/head.mjs +0 -61
  695. package/dist/adapters/http/ui/theme/contract/head.mjs.map +0 -1
  696. package/dist/adapters/http/ui/theme/contract/index.d.ts +0 -6
  697. package/dist/adapters/http/ui/theme/contract/index.d.ts.map +0 -1
  698. package/dist/adapters/http/ui/theme/contract/index.mjs +0 -8
  699. package/dist/adapters/http/ui/theme/contract/manifest.d.ts +0 -25
  700. package/dist/adapters/http/ui/theme/contract/manifest.d.ts.map +0 -1
  701. package/dist/adapters/http/ui/theme/contract/manifest.mjs +0 -77
  702. package/dist/adapters/http/ui/theme/contract/manifest.mjs.map +0 -1
  703. package/dist/adapters/http/ui/theme/contract/types.d.ts +0 -26
  704. package/dist/adapters/http/ui/theme/contract/types.d.ts.map +0 -1
  705. package/dist/adapters/http/ui/theme/contract/utils.d.ts +0 -11
  706. package/dist/adapters/http/ui/theme/contract/utils.d.ts.map +0 -1
  707. package/dist/adapters/http/ui/theme/contract/utils.mjs +0 -22
  708. package/dist/adapters/http/ui/theme/contract/utils.mjs.map +0 -1
  709. package/dist/adapters/http/ui/theme/index.d.ts +0 -7
  710. package/dist/adapters/http/ui/theme/index.d.ts.map +0 -1
  711. package/dist/adapters/http/ui/theme/index.mjs +0 -13
  712. package/dist/adapters/http/ui/theme/module.d.ts +0 -79
  713. package/dist/adapters/http/ui/theme/module.d.ts.map +0 -1
  714. package/dist/adapters/http/ui/theme/module.mjs +0 -206
  715. package/dist/adapters/http/ui/theme/module.mjs.map +0 -1
  716. package/dist/adapters/http/ui/theme/types.d.ts +0 -42
  717. package/dist/adapters/http/ui/theme/types.d.ts.map +0 -1
  718. package/dist/app/modules/config/helpers.d.ts +0 -9
  719. package/dist/app/modules/config/helpers.d.ts.map +0 -1
  720. package/dist/app/modules/config/helpers.mjs +0 -22
  721. package/dist/app/modules/config/helpers.mjs.map +0 -1
  722. package/dist/app/modules/config/normalize.d.ts +0 -3
  723. package/dist/app/modules/config/normalize.d.ts.map +0 -1
  724. package/dist/app/modules/config/normalize.mjs +0 -117
  725. package/dist/app/modules/config/normalize.mjs.map +0 -1
  726. package/dist/app/modules/config/origins.d.ts +0 -25
  727. package/dist/app/modules/config/origins.d.ts.map +0 -1
  728. package/dist/app/modules/config/origins.mjs +0 -46
  729. package/dist/app/modules/config/origins.mjs.map +0 -1
  730. package/dist/app/modules/config/read/env.d.ts +0 -3
  731. package/dist/app/modules/config/read/env.d.ts.map +0 -1
  732. package/dist/app/modules/config/read/env.mjs +0 -139
  733. package/dist/app/modules/config/read/env.mjs.map +0 -1
  734. package/dist/app/modules/config/read/fs.d.ts +0 -3
  735. package/dist/app/modules/config/read/fs.d.ts.map +0 -1
  736. package/dist/app/modules/config/read/fs.mjs +0 -60
  737. package/dist/app/modules/config/read/fs.mjs.map +0 -1
  738. package/dist/app/modules/config/read/index.d.ts +0 -5
  739. package/dist/app/modules/config/read/index.d.ts.map +0 -1
  740. package/dist/app/modules/config/read/index.mjs +0 -7
  741. package/dist/app/modules/config/read/module.d.ts +0 -4
  742. package/dist/app/modules/config/read/module.d.ts.map +0 -1
  743. package/dist/app/modules/config/read/module.mjs +0 -29
  744. package/dist/app/modules/config/read/module.mjs.map +0 -1
  745. package/dist/app/modules/config/read/types.d.ts +0 -9
  746. package/dist/app/modules/config/read/types.d.ts.map +0 -1
  747. package/dist/app/modules/config/trust-proxy.d.ts +0 -28
  748. package/dist/app/modules/config/trust-proxy.d.ts.map +0 -1
  749. package/dist/app/modules/config/trust-proxy.mjs +0 -64
  750. package/dist/app/modules/config/trust-proxy.mjs.map +0 -1
  751. package/dist/cli/config.d.ts +0 -18
  752. package/dist/cli/config.d.ts.map +0 -1
  753. package/dist/cli/config.mjs +0 -34
  754. package/dist/cli/config.mjs.map +0 -1
  755. package/dist/cli/types.d.ts.map +0 -1
  756. package/dist/utils/host.d.ts +0 -2
  757. package/dist/utils/host.d.ts.map +0 -1
  758. package/dist/utils/host.mjs +0 -12
  759. package/dist/utils/host.mjs.map +0 -1
  760. /package/dist/adapters/http/{middleware/built-in → controllers/workflows/account}/types.mjs +0 -0
  761. /package/dist/adapters/http/{ui/console-packages → controllers/workflows/admin}/index.d.ts +0 -0
  762. /package/dist/adapters/http/{ui/account-console → controllers/workflows/admin}/types.mjs +0 -0
  763. /package/dist/adapters/http/{ui/auth-console → controllers/workflows/console-login}/types.mjs +0 -0
  764. /package/dist/adapters/http/{ui/console-packages → internal-client}/types.mjs +0 -0
  765. /package/dist/{adapters/http/ui/theme/contract → app/modules/components}/types.mjs +0 -0
  766. /package/dist/cli/{types.d.ts → commands/types.d.ts} +0 -0
  767. /package/dist/{adapters/http/ui/theme → cli/commands}/types.mjs +0 -0
  768. /package/dist/{app/modules/config/read → core/oauth2/backchannel-logout}/types.mjs +0 -0
  769. /package/dist/{cli → core/oauth2/console-login}/types.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","names":["OAuth2FederatedLoginRefusal"],"sources":["../../../../src/core/oauth2/federated-login/types.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n OAuth2AuthorizationCodeRequest,\n OAuth2IdentityProvider,\n OpenIDIdentityProvider, \n User, \n} from '@authup/core-kit';\nimport type { OAuth2ErrorCode } from '@authup/specs';\nimport type { Logger } from '@authup/server-kit';\nimport type { IIdentityProviderAccountManager } from '../../identity/provider/account/types.ts';\nimport type { IOAuth2Authenticator } from '../../identity/provider/authentication/protocols/index.ts';\nimport type { IEventService, IRealmRepository } from '../../entities/index.ts';\nimport type { IOAuth2AccessPolicyEvaluator } from '../access-policy/index.ts';\nimport type {\n IOAuth2AuthorizationCodeIssuer,\n IOAuth2AuthorizationCodeRequestVerifier,\n} from '../authorization/index.ts';\n\nexport type OAuth2FederatedLoginCompleteInput = {\n /**\n * The provider the callback belongs to, already resolved and\n * protocol-checked by the caller.\n */\n provider: OAuth2IdentityProvider | OpenIDIdentityProvider,\n /**\n * The RP's original authorization request, as `authorize-out` stored\n * it on the state blob. It is re-verified here rather than trusted.\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n /**\n * The provider's single-use authorization code.\n */\n code: string,\n request?: {\n ipAddress?: string | null,\n userAgent?: string | null,\n },\n};\n\n/**\n * Why a completion was refused. Every value is a REFUSAL — a decision the\n * person at the browser has to be told about on the hosted login page —\n * never a server failure, which keeps throwing.\n */\nexport enum OAuth2FederatedLoginRefusal {\n /**\n * The stored code request no longer verifies (client deactivated or\n * unknown, grant allowlist, scopes, redirect_uri mismatch). The hosted\n * page re-runs the same verifier and renders the same refusal, so\n * nothing is echoed and the bounce carries no marker.\n */\n CODE_REQUEST = 'codeRequest',\n /**\n * The provider was disabled while the person was away at it.\n */\n PROVIDER_DISABLED = 'providerDisabled',\n /**\n * The linked local user is inactive. The local login path refuses one\n * too, and a federated login must not be the way around that.\n */\n USER_INACTIVE = 'userInactive',\n /**\n * The client's access policy denied the identity (plan 052).\n */\n ACCESS_DENIED = 'accessDenied',\n}\n\nexport type OAuth2FederatedLoginRefusedResult = {\n kind: 'refused',\n refusal: OAuth2FederatedLoginRefusal,\n /**\n * The marker the hosted authorize page maps onto its own copy, when\n * the refusal has one. Absent means \"render the request again\", which\n * re-runs the verifier and states the reason itself.\n */\n error?: `${OAuth2ErrorCode}`,\n /**\n * The request to re-render. The verified copy when re-verification got\n * that far, else the stored one.\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n};\n\nexport type OAuth2FederatedLoginIssuedResult = {\n kind: 'issued',\n /**\n * The verified redirect target of the RP. Its scheme passed\n * `isSafeRedirectURLScheme`, so a caller may navigate it.\n */\n redirectUri: string,\n /**\n * The authorization code id the RP redeems at `/token`.\n */\n code: string,\n state?: string,\n /**\n * The verified request, for a caller that has to re-render the hosted\n * page alongside the redirect (the custom-scheme interstitial).\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n client: {\n id: string,\n name: string,\n displayName: string | null,\n },\n};\n\nexport type OAuth2FederatedLoginCompleteResult = OAuth2FederatedLoginRefusedResult |\n OAuth2FederatedLoginIssuedResult;\n\n/**\n * Completes the RP's original authorization request after an external\n * provider sent the browser back (issue #3446). It owns the refusal ladder\n * — realm match, code-request re-verification, redirect-scheme gate,\n * provider and user state, access policy and mints the authup code.\n *\n * Deliberately transport-free: it decides WHAT the answer is, and returns\n * it as a discriminated result. The adapter decides how that answer\n * reaches the browser (a redirect, or the interstitial page a custom\n * scheme needs), because only the adapter knows the difference.\n */\nexport interface IOAuth2FederatedLoginService {\n complete(input: OAuth2FederatedLoginCompleteInput) : Promise<OAuth2FederatedLoginCompleteResult>;\n}\n\nexport type OAuth2FederatedLoginServiceOptions = {\n /**\n * The public base URL. Reaches the provider authenticator, which\n * builds the callback URL the external token exchange must repeat.\n */\n baseURL: string,\n};\n\n/**\n * Builds the authenticator that exchanges the provider's code. Injected\n * rather than constructed inline so the refusal ladder can be exercised\n * without an external provider; it defaults to the real preset/protocol\n * factory.\n */\nexport type OAuth2FederatedLoginAuthenticatorFactory = (\n provider: OAuth2IdentityProvider | OpenIDIdentityProvider,\n options: {\n baseURL: string, \n clientId?: string, \n logger?: Logger \n },\n) => IOAuth2Authenticator<User>;\n\nexport type OAuth2FederatedLoginServiceContext = {\n options: OAuth2FederatedLoginServiceOptions,\n\n accountManager: IIdentityProviderAccountManager,\n realmRepository: IRealmRepository,\n codeRequestVerifier: IOAuth2AuthorizationCodeRequestVerifier,\n codeIssuer: IOAuth2AuthorizationCodeIssuer,\n\n accessPolicyEvaluator?: IOAuth2AccessPolicyEvaluator,\n eventService?: IEventService,\n logger?: Logger,\n authenticatorFactory?: OAuth2FederatedLoginAuthenticatorFactory,\n};\n"],"mappings":";;;;;;;;GAkDA,IAAO,8BAAKA,uBAAAA,6BAAAA;;;;;;IAMP,4BAAA,kBAAA;;;IAIA,4BAAA,uBAAA;;;;IAKA,4BAAA,mBAAA;;;IAIA,4BAAA,mBAAA;CAnBOA,OAAAA;AAqBX,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"types.mjs","names":["OAuth2FederatedLoginRefusal"],"sources":["../../../../src/core/oauth2/federated-login/types.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n OAuth2AuthorizationCodeRequest,\n OAuth2IdentityProvider,\n OpenIDIdentityProvider, \n User, \n} from '@authup/core-kit';\nimport type { OAuth2ErrorCode, OAuth2TokenGrantResponse } from '@authup/specs';\nimport type { Logger } from '@authup/server-kit';\nimport type { IIdentityProviderAccountManager } from '../../identity/provider/account/types.ts';\nimport type { IOAuth2Authenticator } from '../../identity/provider/authentication/protocols/index.ts';\nimport type { IEventService, IRealmRepository } from '../../entities/index.ts';\nimport type { ISessionManager } from '../../authentication/index.ts';\nimport type { IAuthFlowMetrics } from '../../metrics/index.ts';\nimport type { IOAuth2TokenIssuer } from '../token/index.ts';\nimport type { IOAuth2AccessPolicyEvaluator } from '../access-policy/index.ts';\nimport type { IOAuth2AuthorizationCodeRequestVerifier } from '../authorization/index.ts';\n\nexport type OAuth2FederatedLoginCompleteInput = {\n /**\n * The provider the callback belongs to, already resolved and\n * protocol-checked by the caller.\n */\n provider: OAuth2IdentityProvider | OpenIDIdentityProvider,\n /**\n * The RP's original authorization request, as `authorize-out` stored\n * it on the state blob. It is re-verified here rather than trusted.\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n /**\n * The provider's single-use authorization code.\n */\n code: string,\n request?: {\n ipAddress?: string | null,\n userAgent?: string | null,\n },\n};\n\n/**\n * Why a completion was refused. Every value is a REFUSAL — a decision the\n * person at the browser has to be told about on the hosted login page —\n * never a server failure, which keeps throwing.\n */\nexport enum OAuth2FederatedLoginRefusal {\n /**\n * The stored code request no longer verifies (client deactivated or\n * unknown, grant allowlist, scopes, redirect_uri mismatch). The hosted\n * page re-runs the same verifier and renders the same refusal, so\n * nothing is echoed and the bounce carries no marker.\n */\n CODE_REQUEST = 'codeRequest',\n /**\n * The provider was disabled while the person was away at it.\n */\n PROVIDER_DISABLED = 'providerDisabled',\n /**\n * The linked local user is inactive. The local login path refuses one\n * too, and a federated login must not be the way around that.\n */\n USER_INACTIVE = 'userInactive',\n /**\n * The client's access policy denied the identity (plan 052).\n */\n ACCESS_DENIED = 'accessDenied',\n /**\n * The upstream did not meet the provider's `requiredAmr` / `requiredAcr`\n * allow-list (issue #3477). Opt-in: a provider declaring neither cannot\n * reach this.\n */\n ASSURANCE_INSUFFICIENT = 'assuranceInsufficient',\n}\n\nexport type OAuth2FederatedLoginRefusedResult = {\n kind: 'refused',\n refusal: OAuth2FederatedLoginRefusal,\n /**\n * The marker the hosted authorize page maps onto its own copy, when\n * the refusal has one. Absent means \"render the request again\", which\n * re-runs the verifier and states the reason itself.\n */\n error?: `${OAuth2ErrorCode}`,\n /**\n * The request to re-render. The verified copy when re-verification got\n * that far, else the stored one.\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n};\n\nexport type OAuth2FederatedLoginIssuedResult = {\n kind: 'issued',\n /**\n * Identifies the pending login the hosted authorize page completes. The\n * caller puts it in a cookie; it is never a URL parameter. No token and no\n * authorization code: the application's code is issued at the end of the\n * hosted ladder, once the prompt gates and consent have run.\n */\n pendingLoginId: string,\n /**\n * The verified request, which the caller re-renders on the hosted\n * page alongside it.\n */\n codeRequest: OAuth2AuthorizationCodeRequest,\n};\n\n/**\n * What a pending login holds. Three scalars, never the identity object (which\n * carries the provider entity incl. its EA-loaded clientSecret and the raw\n * external token payload) and never a token.\n */\nexport type OAuth2FederatedLoginPending = {\n sessionId: string,\n /**\n * The provider the login was started at. The completion endpoint is\n * provider-scoped, so a pending login cannot be completed at another.\n */\n providerId: string,\n /**\n * Actor name for the LOGIN security event.\n */\n userName?: string | null,\n};\n\nexport interface IOAuth2FederatedLoginStore {\n /**\n * @returns the id of the pending login\n */\n save(data: OAuth2FederatedLoginPending) : Promise<string>;\n\n /**\n * Reads and DROPS it. Single use: one pending login completes once.\n */\n consume(id: string) : Promise<OAuth2FederatedLoginPending | null>;\n}\n\nexport type OAuth2FederatedLoginCompleteHandoffInput = {\n /**\n * From the cookie the callback set on this browser.\n */\n pendingLoginId: string,\n /**\n * The provider the completion endpoint was addressed at.\n */\n providerId: string,\n};\n\nexport type OAuth2FederatedLoginCompleteResult = OAuth2FederatedLoginRefusedResult |\n OAuth2FederatedLoginIssuedResult;\n\n/**\n * Completes the external leg of a federated login after a provider sent\n * the browser back (issue #3446). It owns the refusal ladder: realm match,\n * code-request re-verification, redirect-scheme gate, provider and user\n * state, access policy.\n *\n * It does NOT mint the RP's authorization code. It establishes the authup\n * session and hands the browser a cookie naming it; the hosted authorize\n * page completes it and runs the same ladder a password login runs before\n * any code is issued (plan 094).\n *\n * Deliberately transport-free: it decides WHAT the answer is, and returns\n * it as a discriminated result. The adapter decides how that answer\n * reaches the browser.\n */\nexport interface IOAuth2FederatedLoginService {\n complete(input: OAuth2FederatedLoginCompleteInput) : Promise<OAuth2FederatedLoginCompleteResult>;\n\n /**\n * Exchange the pending login for the grant of the session the callback\n * established. Refuses without detail: the caller is anonymous.\n *\n * The local second factor is deliberately NOT gated here: an external\n * provider authenticated this login and is where MFA is enforced for it.\n * An application that asks for one explicitly (`acr_values`) still steps\n * up at `POST /authorize`.\n *\n * @throws BadRequestError\n */\n completeHandoff(input: OAuth2FederatedLoginCompleteHandoffInput) : Promise<OAuth2TokenGrantResponse>;\n}\n\nexport type OAuth2FederatedLoginServiceOptions = {\n /**\n * The public base URL. Reaches the provider authenticator, which\n * builds the callback URL the external token exchange must repeat.\n */\n baseURL: string,\n};\n\n/**\n * Builds the authenticator that exchanges the provider's code. Injected\n * rather than constructed inline so the refusal ladder can be exercised\n * without an external provider; it defaults to the real preset/protocol\n * factory.\n */\nexport type OAuth2FederatedLoginAuthenticatorFactory = (\n provider: OAuth2IdentityProvider | OpenIDIdentityProvider,\n options: {\n baseURL: string, \n clientId?: string, \n logger?: Logger \n },\n) => IOAuth2Authenticator<User>;\n\nexport type OAuth2FederatedLoginServiceContext = {\n options: OAuth2FederatedLoginServiceOptions,\n\n accountManager: IIdentityProviderAccountManager,\n realmRepository: IRealmRepository,\n codeRequestVerifier: IOAuth2AuthorizationCodeRequestVerifier,\n\n sessionManager: ISessionManager,\n pendingLoginStore: IOAuth2FederatedLoginStore,\n accessTokenIssuer: IOAuth2TokenIssuer,\n refreshTokenIssuer: IOAuth2TokenIssuer,\n\n accessPolicyEvaluator?: IOAuth2AccessPolicyEvaluator,\n eventService?: IEventService,\n metrics?: IAuthFlowMetrics,\n logger?: Logger,\n authenticatorFactory?: OAuth2FederatedLoginAuthenticatorFactory,\n};\n"],"mappings":";;;;;;;;GAkDA,IAAO,8BAAKA,uBAAAA,6BAAAA;;;;;;IAMP,4BAAA,kBAAA;;;IAIA,4BAAA,uBAAA;;;;IAKA,4BAAA,mBAAA;;;IAIA,4BAAA,mBAAA;;;;;IAMA,4BAAA,4BAAA;CAzBOA,OAAAA;AA2BX,EAAA,CAAA,CAAA"}
@@ -2,8 +2,8 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { buildOAuth2TokenHash, deriveAmrAcr } from "../authorization/helpers.mjs";
5
- import { OAuth2BaseGrant } from "./base.mjs";
6
5
  import { buildOAuth2BearerTokenResponse } from "../response/bearer.mjs";
6
+ import { OAuth2BaseGrant } from "./base.mjs";
7
7
  import { ScopeName } from "@authup/core-kit";
8
8
  import { JWKUse, hasOAuth2Scopes } from "@authup/specs";
9
9
  //#region src/core/oauth2/grant-types/authorize.ts
@@ -1,8 +1,8 @@
1
1
  import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
- import { OAuth2BaseGrant } from "./base.mjs";
5
4
  import { buildOAuth2BearerTokenResponse } from "../response/bearer.mjs";
5
+ import { OAuth2BaseGrant } from "./base.mjs";
6
6
  import { IdentityType, ScopeName, SessionAuthMethod } from "@authup/core-kit";
7
7
  import { OAuth2SubKind } from "@authup/specs";
8
8
  //#region src/core/oauth2/grant-types/client-credentials.ts
@@ -2,8 +2,8 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { deriveAmrAcr } from "../authorization/helpers.mjs";
5
- import { OAuth2BaseGrant } from "./base.mjs";
6
5
  import { buildOAuth2BearerTokenResponse } from "../response/bearer.mjs";
6
+ import { OAuth2BaseGrant } from "./base.mjs";
7
7
  import { ScopeName, SessionAuthMethod } from "@authup/core-kit";
8
8
  //#region src/core/oauth2/grant-types/identity.ts
9
9
  var IdentityGrantType = class extends OAuth2BaseGrant {
@@ -2,8 +2,8 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { deriveAmrAcr } from "../authorization/helpers.mjs";
5
- import { OAuth2BaseGrant } from "./base.mjs";
6
5
  import { buildOAuth2BearerTokenResponse } from "../response/bearer.mjs";
6
+ import { OAuth2BaseGrant } from "./base.mjs";
7
7
  import { EventName, EventRefType, EventScope, IdentityType, ScopeName, SessionAuthMethod } from "@authup/core-kit";
8
8
  import { OAuth2SubKind, OAuth2TokenGrant } from "@authup/specs";
9
9
  //#region src/core/oauth2/grant-types/password.ts
@@ -1,8 +1,8 @@
1
1
  import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
- import { OAuth2BaseGrant } from "./base.mjs";
5
4
  import { buildOAuth2BearerTokenResponse } from "../response/bearer.mjs";
5
+ import { OAuth2BaseGrant } from "./base.mjs";
6
6
  import { isSessionTokenRelationMissingError } from "../session-token/error.mjs";
7
7
  import "../session-token/index.mjs";
8
8
  import { EventName, EventRefType, EventScope } from "@authup/core-kit";
@@ -1,9 +1,13 @@
1
1
  export * from './access-policy/index.ts';
2
2
  export * from './authorization/index.ts';
3
+ export * from './backchannel-logout/index.ts';
3
4
  export * from './client/index.ts';
5
+ export * from './console-login/index.ts';
6
+ export * from './session-credential/index.ts';
4
7
  export * from './end-session/index.ts';
5
8
  export * from './federated-login/index.ts';
6
9
  export * from './grant-types/index.ts';
10
+ export * from './introspection/index.ts';
7
11
  export * from './mfa-login/index.ts';
8
12
  export * from './openid/index.ts';
9
13
  export * from './response/index.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/oauth2/index.ts"],"names":[],"mappings":"AAOA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/oauth2/index.ts"],"names":[],"mappings":"AAOA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@ import.meta.url;
4
4
  import { OAuth2AccessPolicyEvaluator } from "./access-policy/module.mjs";
5
5
  import "./access-policy/index.mjs";
6
6
  import { OAuth2AuthorizationCodeIssuer } from "./authorization/code/issuer/module.mjs";
7
- import { base64URLEncode, buildOAuth2CodeChallenge, buildOAuth2TokenHash, deriveAmrAcr, generateOAuth2CodeVerifier } from "./authorization/helpers.mjs";
7
+ import { base64URLEncode, buildOAuth2CodeChallenge, buildOAuth2TokenHash, createOAuth2PKCE, deriveAmrAcr, generateOAuth2CodeVerifier } from "./authorization/helpers.mjs";
8
8
  import { OAuth2AuthorizationCodeVerifier } from "./authorization/code/verifier/module.mjs";
9
9
  import { OAuth2ClientAuthenticator } from "./client/authenticator.mjs";
10
10
  import { assertClientGrantAllowed } from "./client/grant-type.mjs";
@@ -14,24 +14,35 @@ import { OAuth2AuthorizationCodeRequestValidator } from "./authorization/code-re
14
14
  import { OAuth2AuthorizationStateManager } from "./authorization/state/module.mjs";
15
15
  import { OAuth2Authorization } from "./authorization/module.mjs";
16
16
  import "./authorization/index.mjs";
17
+ import { OAUTH2_BACKCHANNEL_LOGOUT_EVENT, OAUTH2_BACKCHANNEL_LOGOUT_MAX_AGE, OAUTH2_BACKCHANNEL_LOGOUT_TIMEOUT } from "./backchannel-logout/constants.mjs";
18
+ import { OAuth2BackchannelLogoutNotifier } from "./backchannel-logout/module.mjs";
19
+ import "./backchannel-logout/index.mjs";
20
+ import { CONSOLE_LOGIN_COOKIE, CONSOLE_LOGIN_TTL } from "./console-login/constants.mjs";
21
+ import { SESSION_COOKIE, SESSION_REFRESH_THROTTLE, SESSION_SECRET_LENGTH } from "./session-credential/constants.mjs";
22
+ import { createSessionSecret, hashSessionSecret } from "./session-credential/module.mjs";
23
+ import "./session-credential/index.mjs";
17
24
  import { OAuth2EndSessionService } from "./end-session/service.mjs";
18
25
  import { OAuth2EndSessionRequestValidator } from "./end-session/validator.mjs";
19
26
  import "./end-session/index.mjs";
27
+ import { OAUTH2_FEDERATED_LOGIN_COOKIE, OAUTH2_FEDERATED_LOGIN_TTL } from "./federated-login/constants.mjs";
28
+ import { buildOAuth2BearerTokenResponse } from "./response/bearer.mjs";
20
29
  import { OAuth2FederatedLoginRefusal } from "./federated-login/types.mjs";
21
30
  import { OAuth2FederatedLoginService } from "./federated-login/module.mjs";
22
31
  import "./federated-login/index.mjs";
23
- import { buildOAuth2BearerTokenResponse } from "./response/bearer.mjs";
24
32
  import { OAuth2AuthorizeGrant } from "./grant-types/authorize.mjs";
25
33
  import { ClientCredentialsGrant } from "./grant-types/client-credentials.mjs";
26
34
  import { IdentityGrantType } from "./grant-types/identity.mjs";
27
35
  import { PasswordGrantType } from "./grant-types/password.mjs";
36
+ import { SESSION_TOKEN_EXPIRY_SWEEP_BATCH_SIZE } from "./session-token/constants.mjs";
28
37
  import { SESSION_TOKEN_RELATION_MISSING_ERROR_INSTANCE, SessionTokenRelationMissingError, isSessionTokenRelationMissingError } from "./session-token/error.mjs";
29
38
  import "./session-token/index.mjs";
30
39
  import { OAuth2RefreshTokenGrant } from "./grant-types/refresh-token.mjs";
31
40
  import "./grant-types/index.mjs";
41
+ import { OAuth2OpenIDClaimsBuilder } from "./openid/claims.mjs";
42
+ import { resolveIntrospectionSubject } from "./introspection/module.mjs";
43
+ import "./introspection/index.mjs";
32
44
  import { OAuth2MfaLoginService } from "./mfa-login/module.mjs";
33
45
  import "./mfa-login/index.mjs";
34
- import { OAuth2OpenIDClaimsBuilder } from "./openid/claims.mjs";
35
46
  import "./openid/index.mjs";
36
47
  import { OAuth2ScopeAttributesResolver } from "./scope/resolver.mjs";
37
48
  import "./scope/index.mjs";
@@ -43,4 +54,4 @@ import { OAuth2TokenRevoker } from "./token/revoker/module.mjs";
43
54
  import { OAuth2TokenSigner } from "./token/signer/module.mjs";
44
55
  import { OAuth2TokenVerifier } from "./token/verifier/module.mjs";
45
56
  import "./token/index.mjs";
46
- export { ClientCredentialsGrant, IdentityGrantType, OAuth2AccessPolicyEvaluator, OAuth2AccessTokenIssuer, OAuth2Authorization, OAuth2AuthorizationCodeIssuer, OAuth2AuthorizationCodeRequestValidator, OAuth2AuthorizationCodeRequestVerifier, OAuth2AuthorizationCodeVerifier, OAuth2AuthorizationStateManager, OAuth2AuthorizeGrant, OAuth2ClientAuthenticator, OAuth2EndSessionRequestValidator, OAuth2EndSessionService, OAuth2FederatedLoginRefusal, OAuth2FederatedLoginService, OAuth2MfaLoginService, OAuth2MfaTokenIssuer, OAuth2OpenIDClaimsBuilder, OAuth2OpenIDTokenIssuer, OAuth2RefreshTokenGrant, OAuth2RefreshTokenIssuer, OAuth2ScopeAttributesResolver, OAuth2TokenRevoker, OAuth2TokenSigner, OAuth2TokenVerifier, PasswordGrantType, SESSION_TOKEN_RELATION_MISSING_ERROR_INSTANCE, SessionTokenRelationMissingError, assertClientGrantAllowed, base64URLEncode, buildOAuth2BearerTokenResponse, buildOAuth2CodeChallenge, buildOAuth2TokenHash, deriveAmrAcr, generateOAuth2CodeVerifier, isSessionTokenRelationMissingError };
57
+ export { CONSOLE_LOGIN_COOKIE, CONSOLE_LOGIN_TTL, ClientCredentialsGrant, IdentityGrantType, OAUTH2_BACKCHANNEL_LOGOUT_EVENT, OAUTH2_BACKCHANNEL_LOGOUT_MAX_AGE, OAUTH2_BACKCHANNEL_LOGOUT_TIMEOUT, OAUTH2_FEDERATED_LOGIN_COOKIE, OAUTH2_FEDERATED_LOGIN_TTL, OAuth2AccessPolicyEvaluator, OAuth2AccessTokenIssuer, OAuth2Authorization, OAuth2AuthorizationCodeIssuer, OAuth2AuthorizationCodeRequestValidator, OAuth2AuthorizationCodeRequestVerifier, OAuth2AuthorizationCodeVerifier, OAuth2AuthorizationStateManager, OAuth2AuthorizeGrant, OAuth2BackchannelLogoutNotifier, OAuth2ClientAuthenticator, OAuth2EndSessionRequestValidator, OAuth2EndSessionService, OAuth2FederatedLoginRefusal, OAuth2FederatedLoginService, OAuth2MfaLoginService, OAuth2MfaTokenIssuer, OAuth2OpenIDClaimsBuilder, OAuth2OpenIDTokenIssuer, OAuth2RefreshTokenGrant, OAuth2RefreshTokenIssuer, OAuth2ScopeAttributesResolver, OAuth2TokenRevoker, OAuth2TokenSigner, OAuth2TokenVerifier, PasswordGrantType, SESSION_COOKIE, SESSION_REFRESH_THROTTLE, SESSION_SECRET_LENGTH, SESSION_TOKEN_EXPIRY_SWEEP_BATCH_SIZE, SESSION_TOKEN_RELATION_MISSING_ERROR_INSTANCE, SessionTokenRelationMissingError, assertClientGrantAllowed, base64URLEncode, buildOAuth2BearerTokenResponse, buildOAuth2CodeChallenge, buildOAuth2TokenHash, createOAuth2PKCE, createSessionSecret, deriveAmrAcr, generateOAuth2CodeVerifier, hashSessionSecret, isSessionTokenRelationMissingError, resolveIntrospectionSubject };
@@ -0,0 +1,3 @@
1
+ export * from './module.ts';
2
+ export * from './types.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/introspection/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { resolveIntrospectionSubject } from "./module.mjs";
5
+ export { resolveIntrospectionSubject };
@@ -0,0 +1,14 @@
1
+ import type { OAuth2IntrospectionSubject, OAuth2IntrospectionSubjectContext, OAuth2IntrospectionSubjectInput } from './types.ts';
2
+ /**
3
+ * The subject half of an introspection answer: resolve the identity, build its
4
+ * OpenID claims and, only for an active credential, project its permissions.
5
+ *
6
+ * One owner for that projection, so a second consumer (the console session
7
+ * endpoint, plan 088) cannot drift from `POST /token/introspect`. The token
8
+ * half (verification, the `active` derivation, the RFC 7662 reporting rules)
9
+ * stays in the controller, which also owns the response spread order.
10
+ *
11
+ * @throws OAuth2RequestError when the subject no longer resolves.
12
+ */
13
+ export declare function resolveIntrospectionSubject(ctx: OAuth2IntrospectionSubjectContext, input: OAuth2IntrospectionSubjectInput): Promise<OAuth2IntrospectionSubject>;
14
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/introspection/module.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,0BAA0B,EAC1B,iCAAiC,EACjC,+BAA+B,EAClC,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC7C,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,+BAA+B,GACtC,OAAO,CAAC,0BAA0B,CAAC,CA2CtC"}
@@ -0,0 +1,49 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { OAuth2OpenIDClaimsBuilder } from "../openid/claims.mjs";
5
+ import { buildPermissionKey } from "@authup/access";
6
+ import { OAuth2RequestError } from "@authup/specs";
7
+ //#region src/core/oauth2/introspection/module.ts
8
+ /**
9
+ * The subject half of an introspection answer: resolve the identity, build its
10
+ * OpenID claims and, only for an active credential, project its permissions.
11
+ *
12
+ * One owner for that projection, so a second consumer (the console session
13
+ * endpoint, plan 088) cannot drift from `POST /token/introspect`. The token
14
+ * half (verification, the `active` derivation, the RFC 7662 reporting rules)
15
+ * stays in the controller, which also owns the response spread order.
16
+ *
17
+ * @throws OAuth2RequestError when the subject no longer resolves.
18
+ */ async function resolveIntrospectionSubject(ctx, input) {
19
+ const identity = await ctx.identityResolver.resolve(input.subKind, input.sub);
20
+ if (!identity) throw OAuth2RequestError.identityInvalid();
21
+ const claims = new OAuth2OpenIDClaimsBuilder().fromIdentity(identity);
22
+ if (!input.active) return {
23
+ identity,
24
+ claims
25
+ };
26
+ const permissions = await ctx.identityPermissionProvider.getFor({
27
+ id: input.sub,
28
+ type: input.subKind,
29
+ clientId: input.clientId,
30
+ realmId: input.realmId
31
+ });
32
+ return {
33
+ identity,
34
+ claims,
35
+ permissions: Object.values(permissions.reduce((acc, binding) => {
36
+ const key = buildPermissionKey(binding.permission);
37
+ if (!acc[key]) acc[key] = {
38
+ name: binding.permission.name,
39
+ client_id: binding.permission.clientId,
40
+ realm_id: binding.permission.realmId
41
+ };
42
+ return acc;
43
+ }, {}))
44
+ };
45
+ }
46
+ //#endregion
47
+ export { resolveIntrospectionSubject };
48
+
49
+ //# sourceMappingURL=module.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.mjs","names":["buildPermissionKey","OAuth2RequestError","OAuth2OpenIDClaimsBuilder","resolveIntrospectionSubject","ctx","input","identity","identityResolver","resolve","subKind","sub","identityInvalid","claimsBuilder","claims","fromIdentity","active","permissions","identityPermissionProvider","getFor","id","type","clientId","realmId","Object","values","reduce","acc","binding","key","permission","name","client_id","realm_id"],"sources":["../../../../src/core/oauth2/introspection/module.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { buildPermissionKey } from '@authup/access';\nimport type { OAuth2TokenPermission } from '@authup/specs';\nimport { OAuth2RequestError } from '@authup/specs';\nimport { OAuth2OpenIDClaimsBuilder } from '../openid/claims.ts';\nimport type {\n OAuth2IntrospectionSubject,\n OAuth2IntrospectionSubjectContext,\n OAuth2IntrospectionSubjectInput,\n} from './types.ts';\n\n/**\n * The subject half of an introspection answer: resolve the identity, build its\n * OpenID claims and, only for an active credential, project its permissions.\n *\n * One owner for that projection, so a second consumer (the console session\n * endpoint, plan 088) cannot drift from `POST /token/introspect`. The token\n * half (verification, the `active` derivation, the RFC 7662 reporting rules)\n * stays in the controller, which also owns the response spread order.\n *\n * @throws OAuth2RequestError when the subject no longer resolves.\n */\nexport async function resolveIntrospectionSubject(\n ctx: OAuth2IntrospectionSubjectContext,\n input: OAuth2IntrospectionSubjectInput,\n) : Promise<OAuth2IntrospectionSubject> {\n const identity = await ctx.identityResolver.resolve(input.subKind, input.sub);\n if (!identity) {\n // todo: differentiate between client & user\n throw OAuth2RequestError.identityInvalid();\n }\n\n const claimsBuilder = new OAuth2OpenIDClaimsBuilder();\n const claims = claimsBuilder.fromIdentity(identity);\n\n if (!input.active) {\n return {\n identity,\n claims,\n };\n }\n\n // todo: only receive client specific permissions\n const permissions = await ctx.identityPermissionProvider.getFor({\n id: input.sub,\n type: input.subKind,\n clientId: input.clientId,\n realmId: input.realmId,\n });\n\n return {\n identity,\n claims,\n // todo: permissions property should be removed.\n permissions: Object.values(\n permissions.reduce((acc, binding) => {\n const key = buildPermissionKey(binding.permission);\n if (!acc[key]) {\n acc[key] = {\n name: binding.permission.name,\n client_id: binding.permission.clientId,\n realm_id: binding.permission.realmId,\n } as OAuth2TokenPermission;\n }\n return acc;\n }, {} as Record<string, OAuth2TokenPermission>),\n ),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;GA4BA,eAAsBG,4BAClBC,KACAC,OAAsC;CAEtC,MAAMC,WAAW,MAAMF,IAAIG,iBAAiBC,QAAQH,MAAMI,SAASJ,MAAMK,GAAG;CAC5E,IAAI,CAACJ,UAED,MAAML,mBAAmBU,gBAAe;CAI5C,MAAME,SAASD,IADWV,0BACXU,CAAAA,CAAcE,aAAaR,QAAAA;CAE1C,IAAI,CAACD,MAAMU,QACP,OAAO;EACHT;EACAO;CACJ;CAIJ,MAAMG,cAAc,MAAMZ,IAAIa,2BAA2BC,OAAO;EAC5DC,IAAId,MAAMK;EACVU,MAAMf,MAAMI;EACZY,UAAUhB,MAAMgB;EAChBC,SAASjB,MAAMiB;CACnB,CAAA;CAEA,OAAO;EACHhB;EACAO;EAEAG,aAAaO,OAAOC,OAChBR,YAAYS,QAAQC,KAAKC,YAAAA;GACrB,MAAMC,MAAM5B,mBAAmB2B,QAAQE,UAAU;GACjD,IAAI,CAACH,IAAIE,MACLF,IAAIE,OAAO;IACPE,MAAMH,QAAQE,WAAWC;IACzBC,WAAWJ,QAAQE,WAAWR;IAC9BW,UAAUL,QAAQE,WAAWP;GACjC;GAEJ,OAAOI;EACX,GAAG,CAAC,CAAA,CAAA;CAEZ;AACJ"}
@@ -0,0 +1,45 @@
1
+ import type { Identity, IdentityType } from '@authup/core-kit';
2
+ import type { OAuth2TokenPermission, OpenIDTokenPayload } from '@authup/specs';
3
+ import type { IIdentityPermissionProvider } from '../../identity/permission/types.ts';
4
+ import type { IIdentityResolver } from '../../identity/resolver/types.ts';
5
+ export type OAuth2IntrospectionSubjectContext = {
6
+ identityResolver: IIdentityResolver;
7
+ identityPermissionProvider: IIdentityPermissionProvider;
8
+ };
9
+ export type OAuth2IntrospectionSubjectInput = {
10
+ /**
11
+ * Subject id.
12
+ */
13
+ sub: string;
14
+ /**
15
+ * Subject kind (user, client).
16
+ */
17
+ subKind: `${IdentityType}`;
18
+ /**
19
+ * The client the projection is scoped to. For a token this is the
20
+ * payload's `client_id`; for the console session endpoint it is the
21
+ * console's own client id, never `RequestIdentity.clientId` (which for a
22
+ * user identity is the user row's own unrelated column).
23
+ */
24
+ clientId?: string | null;
25
+ /**
26
+ * The realm the projection is scoped to.
27
+ */
28
+ realmId?: string | null;
29
+ /**
30
+ * Whether the credential the projection describes is usable. Permissions
31
+ * are resolved ONLY when it is: an inactive credential reports who it
32
+ * belonged to and nothing about what they may do, and a dead credential
33
+ * must not pay for a permission read.
34
+ */
35
+ active: boolean;
36
+ };
37
+ export type OAuth2IntrospectionSubject = {
38
+ identity: Identity;
39
+ claims: OpenIDTokenPayload;
40
+ /**
41
+ * Present only for an `active` input.
42
+ */
43
+ permissions?: OAuth2TokenPermission[];
44
+ };
45
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/introspection/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,MAAM,iCAAiC,GAAG;IAC5C,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,0BAA0B,EAAE,2BAA2B,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC1C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACzC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ export {};
@@ -1,10 +1,18 @@
1
1
  import type { Client, Identity, User } from '@authup/core-kit';
2
- import type { OpenIDTokenPayload } from '@authup/specs';
2
+ import type { OpenIDClaims, OpenIDTokenPayload } from '@authup/specs';
3
3
  import type { ObjectLiteral } from 'validup';
4
4
  type AttributeMapTuple<T> = {
5
5
  [K in keyof T]: [K, (value: unknown) => any];
6
6
  }[keyof T];
7
- type AttributeMap<T extends Record<string, any>> = Record<keyof OpenIDTokenPayload, keyof T | AttributeMapTuple<T>>;
7
+ /**
8
+ * Keyed on `OpenIDClaims`, never on `OpenIDTokenPayload`: the latter inherits
9
+ * `JWTClaims`' `[key: string]: any`, so `keyof` collapses to `string | number`
10
+ * and the map accepts any claim name at all — a typo compiles and the claim is
11
+ * simply never emitted, which is the failure mode #3518 is about. `OpenIDClaims`
12
+ * carries no index signature, so a name that is not a claim fails the build.
13
+ * `Partial`, because a map declares only the claims its entity can supply.
14
+ */
15
+ type AttributeMap<T extends Record<string, any>> = Partial<Record<keyof OpenIDClaims, keyof T | AttributeMapTuple<T>>>;
8
16
  export declare class OAuth2OpenIDClaimsBuilder {
9
17
  protected clientMap: AttributeMap<Client>;
10
18
  protected userMap: AttributeMap<User>;
@@ -16,6 +24,16 @@ export declare class OAuth2OpenIDClaimsBuilder {
16
24
  fromIdentity(identity: Identity): OpenIDTokenPayload;
17
25
  fromClient(input: Client): OpenIDTokenPayload;
18
26
  fromUser(input: User): OpenIDTokenPayload;
27
+ /**
28
+ * A claim is emitted only for a value that exists AND is not nullish.
29
+ *
30
+ * The map reads entity columns, several of which are nullable, and OIDC
31
+ * models an unavailable claim as one that is not returned rather than one
32
+ * returned as `null` — so a user without a display name must omit
33
+ * `nickname`, not answer `nickname: null` (#3518). Emitting the null also
34
+ * put a JSON `null` claim value into every id_token, which no relying
35
+ * party expects.
36
+ */
19
37
  protected extract<T extends ObjectLiteral = ObjectLiteral>(attributeMap: AttributeMap<T>, attributes: T): OpenIDTokenPayload;
20
38
  }
21
39
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/openid/claims.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,IAAI,EACP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,iBAAiB,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAC/C,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,MAAM,CACrD,MAAM,kBAAkB,EAC5B,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAC7B,CAAC;AAEF,qBAAa,yBAAyB;IAClC,SAAS,CAAC,SAAS,EAAG,YAAY,CAAC,MAAM,CAAC,CAcxC;IAEF,SAAS,CAAC,OAAO,EAAG,YAAY,CAAC,IAAI,CAAC,CAmBpC;IAEF;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAI,kBAAkB;IAQrD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAI,kBAAkB;IAI9C,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAI,kBAAkB;IAI1C,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EACrD,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,UAAU,EAAE,CAAC,GACb,kBAAkB;CAqBzB"}
1
+ {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/openid/claims.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,IAAI,EACP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,iBAAiB,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAC/C,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX;;;;;;;GAOG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAC7D,MAAM,YAAY,EACtB,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAC7B,CAAC,CAAC;AAEH,qBAAa,yBAAyB;IAClC,SAAS,CAAC,SAAS,EAAG,YAAY,CAAC,MAAM,CAAC,CAcxC;IAEF,SAAS,CAAC,OAAO,EAAG,YAAY,CAAC,IAAI,CAAC,CAmBpC;IAEF;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAI,kBAAkB;IAQrD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAI,kBAAkB;IAI9C,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAI,kBAAkB;IAI1C;;;;;;;;;OASG;IACH,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EACrD,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,UAAU,EAAE,CAAC,GACb,kBAAkB;CAuCzB"}
@@ -25,7 +25,7 @@ var OAuth2OpenIDClaimsBuilder = class {
25
25
  return value;
26
26
  }],
27
27
  email: "email",
28
- email_verified: "active"
28
+ email_verified: "emailVerified"
29
29
  };
30
30
  /**
31
31
  * Build OpenID Claims form Oauth2 Identity.
@@ -41,17 +41,31 @@ var OAuth2OpenIDClaimsBuilder = class {
41
41
  fromUser(input) {
42
42
  return this.extract(this.userMap, input);
43
43
  }
44
- extract(attributeMap, attributes) {
44
+ /**
45
+ * A claim is emitted only for a value that exists AND is not nullish.
46
+ *
47
+ * The map reads entity columns, several of which are nullable, and OIDC
48
+ * models an unavailable claim as one that is not returned rather than one
49
+ * returned as `null` — so a user without a display name must omit
50
+ * `nickname`, not answer `nickname: null` (#3518). Emitting the null also
51
+ * put a JSON `null` claim value into every id_token, which no relying
52
+ * party expects.
53
+ */ extract(attributeMap, attributes) {
45
54
  const result = {};
46
55
  const keys = Object.keys(attributeMap);
47
56
  for (const key_ of keys) {
48
57
  const attribute = attributeMap[key_];
58
+ let value;
49
59
  if (typeof attribute === "string") {
50
- if (hasOwnProperty(attributes, attribute)) result[key_] = attributes[attribute];
60
+ if (!hasOwnProperty(attributes, attribute)) continue;
61
+ value = attributes[attribute];
51
62
  } else {
52
63
  const [key, transformer] = attribute;
53
- if (hasOwnProperty(attributes, key)) result[key_] = transformer(attributes[key]);
64
+ if (!hasOwnProperty(attributes, key)) continue;
65
+ value = transformer(attributes[key]);
54
66
  }
67
+ if (typeof value === "undefined" || value === null) continue;
68
+ result[key_] = value;
55
69
  }
56
70
  return result;
57
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"claims.mjs","names":["hasOwnProperty","OAuth2SubKind","OAuth2OpenIDClaimsBuilder","clientMap","name","nickname","preferred_username","updated_at","value","Math","floor","Date","getTime","userMap","family_name","given_name","email","email_verified","fromIdentity","identity","type","CLIENT","fromClient","data","fromUser","input","extract","attributeMap","attributes","result","keys","Object","key_","attribute","key","transformer"],"sources":["../../../../src/core/oauth2/openid/claims.ts"],"sourcesContent":["/*\n * Copyright (c) 2022.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n Client, \n Identity, \n User,\n} from '@authup/core-kit';\nimport { hasOwnProperty } from '@authup/kit';\nimport type { OpenIDTokenPayload } from '@authup/specs';\nimport { OAuth2SubKind } from '@authup/specs';\nimport type { ObjectLiteral } from 'validup';\n\ntype AttributeMapTuple<T> = {\n [K in keyof T]: [K, (value: unknown) => any]\n}[keyof T];\n\ntype AttributeMap<T extends Record<string, any>> = Record<\n keyof OpenIDTokenPayload,\nkeyof T | AttributeMapTuple<T>\n>;\n\nexport class OAuth2OpenIDClaimsBuilder {\n protected clientMap : AttributeMap<Client> = {\n name: 'name',\n nickname: 'name',\n preferred_username: 'name',\n updated_at: [\n 'updatedAt',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n };\n\n protected userMap : AttributeMap<User> = {\n name: 'name',\n family_name: 'lastName',\n given_name: 'firstName',\n nickname: 'displayName',\n preferred_username: 'displayName',\n updated_at: [\n 'updatedAt',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n\n email: 'email',\n email_verified: 'active',\n };\n\n /**\n * Build OpenID Claims form Oauth2 Identity.\n *\n * @param identity\n */\n fromIdentity(identity: Identity) : OpenIDTokenPayload {\n if (identity.type === OAuth2SubKind.CLIENT) {\n return this.fromClient(identity.data);\n }\n\n return this.fromUser(identity.data);\n }\n\n fromClient(input: Client) : OpenIDTokenPayload {\n return this.extract(this.clientMap, input);\n }\n\n fromUser(input: User) : OpenIDTokenPayload {\n return this.extract(this.userMap, input);\n }\n\n protected extract<T extends ObjectLiteral = ObjectLiteral>(\n attributeMap: AttributeMap<T>,\n attributes: T,\n ) : OpenIDTokenPayload {\n const result = {} as OpenIDTokenPayload;\n\n const keys = Object.keys(attributeMap);\n for (const key_ of keys) {\n const attribute = attributeMap[key_];\n if (typeof attribute === 'string') {\n if (hasOwnProperty(attributes, attribute)) {\n result[key_] = attributes[attribute];\n }\n } else {\n const [key, transformer] = attribute as AttributeMapTuple<T>;\n\n if (hasOwnProperty(attributes, key)) {\n result[key_] = transformer(attributes[key]);\n }\n }\n }\n\n return result;\n }\n}\n"],"mappings":";;;;;;AA0BA,IAAaE,4BAAb,MAAaA;CACCC,YAAmC;EACzCC,MAAM;EACNC,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,cACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CACH;CACL;CAEUK,UAA+B;EACrCT,MAAM;EACNU,aAAa;EACbC,YAAY;EACZV,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,cACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CACH;EAEDQ,OAAO;EACPC,gBAAgB;CACpB;;;;;IAOAC,aAAaC,UAAyC;EAClD,IAAIA,SAASC,SAASnB,cAAcoB,QAChC,OAAO,KAAKC,WAAWH,SAASI,IAAI;EAGxC,OAAO,KAAKC,SAASL,SAASI,IAAI;CACtC;CAEAD,WAAWG,OAAoC;EAC3C,OAAO,KAAKC,QAAQ,KAAKvB,WAAWsB,KAAAA;CACxC;CAEAD,SAASC,OAAkC;EACvC,OAAO,KAAKC,QAAQ,KAAKb,SAASY,KAAAA;CACtC;CAEUC,QACNC,cACAC,YACmB;EACnB,MAAMC,SAAS,CAAC;EAEhB,MAAMC,OAAOC,OAAOD,KAAKH,YAAAA;EACzB,KAAK,MAAMK,QAAQF,MAAM;GACrB,MAAMG,YAAYN,aAAaK;GAC/B,IAAI,OAAOC,cAAc,UACjBjC;QAAAA,eAAe4B,YAAYK,SAAAA,GAC3BJ,OAAOG,QAAQJ,WAAWK;GAAAA,OAE3B;IACH,MAAM,CAACC,KAAKC,eAAeF;IAE3B,IAAIjC,eAAe4B,YAAYM,GAAAA,GAC3BL,OAAOG,QAAQG,YAAYP,WAAWM,IAAI;GAElD;EACJ;EAEA,OAAOL;CACX;AACJ"}
1
+ {"version":3,"file":"claims.mjs","names":["hasOwnProperty","OAuth2SubKind","OAuth2OpenIDClaimsBuilder","clientMap","name","nickname","preferred_username","updated_at","value","Math","floor","Date","getTime","userMap","family_name","given_name","email","email_verified","fromIdentity","identity","type","CLIENT","fromClient","data","fromUser","input","extract","attributeMap","attributes","result","keys","Object","key_","attribute","key","transformer"],"sources":["../../../../src/core/oauth2/openid/claims.ts"],"sourcesContent":["/*\n * Copyright (c) 2022.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n Client, \n Identity, \n User,\n} from '@authup/core-kit';\nimport { hasOwnProperty } from '@authup/kit';\nimport type { OpenIDClaims, OpenIDTokenPayload } from '@authup/specs';\nimport { OAuth2SubKind } from '@authup/specs';\nimport type { ObjectLiteral } from 'validup';\n\ntype AttributeMapTuple<T> = {\n [K in keyof T]: [K, (value: unknown) => any]\n}[keyof T];\n\n/**\n * Keyed on `OpenIDClaims`, never on `OpenIDTokenPayload`: the latter inherits\n * `JWTClaims`' `[key: string]: any`, so `keyof` collapses to `string | number`\n * and the map accepts any claim name at all — a typo compiles and the claim is\n * simply never emitted, which is the failure mode #3518 is about. `OpenIDClaims`\n * carries no index signature, so a name that is not a claim fails the build.\n * `Partial`, because a map declares only the claims its entity can supply.\n */\ntype AttributeMap<T extends Record<string, any>> = Partial<Record<\n keyof OpenIDClaims,\nkeyof T | AttributeMapTuple<T>\n>>;\n\nexport class OAuth2OpenIDClaimsBuilder {\n protected clientMap : AttributeMap<Client> = {\n name: 'name',\n nickname: 'name',\n preferred_username: 'name',\n updated_at: [\n 'updatedAt',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n };\n\n protected userMap : AttributeMap<User> = {\n name: 'name',\n family_name: 'lastName',\n given_name: 'firstName',\n nickname: 'displayName',\n preferred_username: 'displayName',\n updated_at: [\n 'updatedAt',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n\n email: 'email',\n email_verified: 'emailVerified',\n };\n\n /**\n * Build OpenID Claims form Oauth2 Identity.\n *\n * @param identity\n */\n fromIdentity(identity: Identity) : OpenIDTokenPayload {\n if (identity.type === OAuth2SubKind.CLIENT) {\n return this.fromClient(identity.data);\n }\n\n return this.fromUser(identity.data);\n }\n\n fromClient(input: Client) : OpenIDTokenPayload {\n return this.extract(this.clientMap, input);\n }\n\n fromUser(input: User) : OpenIDTokenPayload {\n return this.extract(this.userMap, input);\n }\n\n /**\n * A claim is emitted only for a value that exists AND is not nullish.\n *\n * The map reads entity columns, several of which are nullable, and OIDC\n * models an unavailable claim as one that is not returned rather than one\n * returned as `null` — so a user without a display name must omit\n * `nickname`, not answer `nickname: null` (#3518). Emitting the null also\n * put a JSON `null` claim value into every id_token, which no relying\n * party expects.\n */\n protected extract<T extends ObjectLiteral = ObjectLiteral>(\n attributeMap: AttributeMap<T>,\n attributes: T,\n ) : OpenIDTokenPayload {\n const result = {} as OpenIDTokenPayload;\n\n const keys = Object.keys(attributeMap) as (keyof OpenIDClaims)[];\n for (const key_ of keys) {\n const attribute = attributeMap[key_];\n\n let value : unknown;\n if (typeof attribute === 'string') {\n if (!hasOwnProperty(attributes, attribute)) {\n continue;\n }\n\n value = attributes[attribute];\n } else {\n const [key, transformer] = attribute as AttributeMapTuple<T>;\n\n if (!hasOwnProperty(attributes, key)) {\n continue;\n }\n\n value = transformer(attributes[key]);\n }\n\n if (\n typeof value === 'undefined' ||\n value === null\n ) {\n continue;\n }\n\n // Cast on the VALUE side only: which claim is written is checked by\n // `AttributeMap`'s key type, while the value comes out of an entity\n // column through an untyped transformer and never had a type here.\n (result as Record<string, unknown>)[key_] = value;\n }\n\n return result;\n }\n}\n"],"mappings":";;;;;;AAkCA,IAAaE,4BAAb,MAAaA;CACCC,YAAmC;EACzCC,MAAM;EACNC,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,cACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CACH;CACL;CAEUK,UAA+B;EACrCT,MAAM;EACNU,aAAa;EACbC,YAAY;EACZV,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,cACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CACH;EAEDQ,OAAO;EACPC,gBAAgB;CACpB;;;;;IAOAC,aAAaC,UAAyC;EAClD,IAAIA,SAASC,SAASnB,cAAcoB,QAChC,OAAO,KAAKC,WAAWH,SAASI,IAAI;EAGxC,OAAO,KAAKC,SAASL,SAASI,IAAI;CACtC;CAEAD,WAAWG,OAAoC;EAC3C,OAAO,KAAKC,QAAQ,KAAKvB,WAAWsB,KAAAA;CACxC;CAEAD,SAASC,OAAkC;EACvC,OAAO,KAAKC,QAAQ,KAAKb,SAASY,KAAAA;CACtC;;;;;;;;;;IAYA,QACIE,cACAC,YACmB;EACnB,MAAMC,SAAS,CAAC;EAEhB,MAAMC,OAAOC,OAAOD,KAAKH,YAAAA;EACzB,KAAK,MAAMK,QAAQF,MAAM;GACrB,MAAMG,YAAYN,aAAaK;GAE/B,IAAIxB;GACJ,IAAI,OAAOyB,cAAc,UAAU;IAC/B,IAAI,CAACjC,eAAe4B,YAAYK,SAAAA,GAC5B;IAGJzB,QAAQoB,WAAWK;GACvB,OAAO;IACH,MAAM,CAACC,KAAKC,eAAeF;IAE3B,IAAI,CAACjC,eAAe4B,YAAYM,GAAAA,GAC5B;IAGJ1B,QAAQ2B,YAAYP,WAAWM,IAAI;GACvC;GAEA,IACI,OAAO1B,UAAU,eACjBA,UAAU,MAEV;GAMHqB,OAAmCG,QAAQxB;EAChD;EAEA,OAAOqB;CACX;AACJ"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The cookie carrying the opaque session credential: the `secret` half of an
3
+ * `auth_sessions` row, never its id (the id is published as `sid` in every
4
+ * id_token and `/sessions` row, so it is an identifier and not a credential).
5
+ *
6
+ * `HttpOnly`, `Secure` under an https publicUrl, and `SameSite=Strict`: it is
7
+ * an ambient credential for the whole API, so it must never ride a cross-site
8
+ * request. See plan 088 for the full gate (`Strict` + `Origin` + a mandatory
9
+ * `Sec-Fetch-Site: same-origin`).
10
+ */
11
+ export declare const SESSION_COOKIE = "authup_session";
12
+ /**
13
+ * Length of the opaque session credential, in nanoid characters. 48 chars of
14
+ * the default 36-symbol alphabet is ~248 bits. The credential is presented on
15
+ * every request and never rotated within a session, so it is sized well past
16
+ * the point where guessing is the weakest link.
17
+ */
18
+ export declare const SESSION_SECRET_LENGTH = 48;
19
+ /**
20
+ * How often a cookie-authenticated request slides the session's expiry.
21
+ *
22
+ * A bearer-mode session is kept alive by the refresh grant, which cookie mode
23
+ * removes: `ping()` moves only `seenAt`, so an active console user would be
24
+ * signed out mid-task once the session reached its ~3-day lifetime. The cookie
25
+ * branch therefore calls `refresh()` instead, throttled to one write per
26
+ * window so a page load's burst of API calls does not rewrite the row a dozen
27
+ * times. It costs nothing extra: `ping()` was already saving the row.
28
+ */
29
+ export declare const SESSION_REFRESH_THROTTLE: number;
30
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/session-credential/constants.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,QAAY,CAAC"}
@@ -0,0 +1,34 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ //#region src/core/oauth2/session-credential/constants.ts
5
+ /**
6
+ * The cookie carrying the opaque session credential: the `secret` half of an
7
+ * `auth_sessions` row, never its id (the id is published as `sid` in every
8
+ * id_token and `/sessions` row, so it is an identifier and not a credential).
9
+ *
10
+ * `HttpOnly`, `Secure` under an https publicUrl, and `SameSite=Strict`: it is
11
+ * an ambient credential for the whole API, so it must never ride a cross-site
12
+ * request. See plan 088 for the full gate (`Strict` + `Origin` + a mandatory
13
+ * `Sec-Fetch-Site: same-origin`).
14
+ */ const SESSION_COOKIE = "authup_session";
15
+ /**
16
+ * Length of the opaque session credential, in nanoid characters. 48 chars of
17
+ * the default 36-symbol alphabet is ~248 bits. The credential is presented on
18
+ * every request and never rotated within a session, so it is sized well past
19
+ * the point where guessing is the weakest link.
20
+ */ const SESSION_SECRET_LENGTH = 48;
21
+ /**
22
+ * How often a cookie-authenticated request slides the session's expiry.
23
+ *
24
+ * A bearer-mode session is kept alive by the refresh grant, which cookie mode
25
+ * removes: `ping()` moves only `seenAt`, so an active console user would be
26
+ * signed out mid-task once the session reached its ~3-day lifetime. The cookie
27
+ * branch therefore calls `refresh()` instead, throttled to one write per
28
+ * window so a page load's burst of API calls does not rewrite the row a dozen
29
+ * times. It costs nothing extra: `ping()` was already saving the row.
30
+ */ const SESSION_REFRESH_THROTTLE = 6e4;
31
+ //#endregion
32
+ export { SESSION_COOKIE, SESSION_REFRESH_THROTTLE, SESSION_SECRET_LENGTH };
33
+
34
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","names":["SESSION_COOKIE","SESSION_SECRET_LENGTH","SESSION_REFRESH_THROTTLE"],"sources":["../../../../src/core/oauth2/session-credential/constants.ts"],"sourcesContent":["/*\n * Copyright (c) 2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\n/**\n * The cookie carrying the opaque session credential: the `secret` half of an\n * `auth_sessions` row, never its id (the id is published as `sid` in every\n * id_token and `/sessions` row, so it is an identifier and not a credential).\n *\n * `HttpOnly`, `Secure` under an https publicUrl, and `SameSite=Strict`: it is\n * an ambient credential for the whole API, so it must never ride a cross-site\n * request. See plan 088 for the full gate (`Strict` + `Origin` + a mandatory\n * `Sec-Fetch-Site: same-origin`).\n */\nexport const SESSION_COOKIE = 'authup_session';\n\n/**\n * Length of the opaque session credential, in nanoid characters. 48 chars of\n * the default 36-symbol alphabet is ~248 bits. The credential is presented on\n * every request and never rotated within a session, so it is sized well past\n * the point where guessing is the weakest link.\n */\nexport const SESSION_SECRET_LENGTH = 48;\n\n/**\n * How often a cookie-authenticated request slides the session's expiry.\n *\n * A bearer-mode session is kept alive by the refresh grant, which cookie mode\n * removes: `ping()` moves only `seenAt`, so an active console user would be\n * signed out mid-task once the session reached its ~3-day lifetime. The cookie\n * branch therefore calls `refresh()` instead, throttled to one write per\n * window so a page load's burst of API calls does not rewrite the row a dozen\n * times. It costs nothing extra: `ping()` was already saving the row.\n */\nexport const SESSION_REFRESH_THROTTLE = 1000 * 60;\n"],"mappings":";;;;;;;;;;;;;GAiBA,MAAaA,iBAAiB;;;;;;GAQ9B,MAAaC,wBAAwB;;;;;;;;;;GAYrC,MAAaC,2BAA2B"}
@@ -0,0 +1,3 @@
1
+ export * from './constants.ts';
2
+ export * from './module.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/session-credential/index.ts"],"names":[],"mappings":"AAOA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { SESSION_COOKIE, SESSION_REFRESH_THROTTLE, SESSION_SECRET_LENGTH } from "./constants.mjs";
5
+ import { createSessionSecret, hashSessionSecret } from "./module.mjs";
6
+ export { SESSION_COOKIE, SESSION_REFRESH_THROTTLE, SESSION_SECRET_LENGTH, createSessionSecret, hashSessionSecret };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Mint the opaque credential a console browser presents (plan 088). It is
3
+ * written to `auth_sessions.secret` (a `select: false` column resolved only by
4
+ * `ISessionRepository.findOneBySecret`) and handed to the browser in the
5
+ * console session cookie.
6
+ */
7
+ export declare function createSessionSecret(): string;
8
+ /**
9
+ * The value actually stored in `auth_sessions.secret`.
10
+ *
11
+ * `select: false` limits what the ORM projects; it does nothing about what the
12
+ * database CONTAINS, so storing the credential verbatim would make any read of
13
+ * that table — a leaked backup, a read replica, a SQL injection that only
14
+ * SELECTs — a source of replayable `authup_session` cookies. The
15
+ * column holds a digest instead, and the cookie value never lands anywhere it
16
+ * can be read back.
17
+ *
18
+ * A plain SHA-256 rather than a keyed HMAC, deliberately. Keying defends a
19
+ * LOW-entropy input against offline guessing, which is why a password needs
20
+ * bcrypt; this input is 48 nanoid characters over a 36-symbol alphabet (~248
21
+ * bits), so there is no guessing attack for a key to frustrate. A keyed scheme
22
+ * would also have to be GLOBAL — the lookup resolves a session BY this value,
23
+ * so the realm is unknown at that point and a per-realm key is unavailable —
24
+ * and the only global key (`SECRETS_ENCRYPTION_KEY`) is optional, so keying
25
+ * would either be absent by default or need key management of its own.
26
+ *
27
+ * Deterministic, so the lookup stays a single indexed equality. Hex SHA-256 is
28
+ * exactly 64 characters, which is the column's width.
29
+ */
30
+ export declare function hashSessionSecret(secret: string): string;
31
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/session-credential/module.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAK,MAAM,CAE7C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAI,MAAM,CAEzD"}