@kensio/yulin 1.18.1 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.d.ts.map +1 -1
  2. package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.js +10 -0
  3. package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.js.map +1 -1
  4. package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.d.ts +27 -0
  5. package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.d.ts.map +1 -0
  6. package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.js +35 -0
  7. package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.js.map +1 -0
  8. package/dist/service/cognito/command/auth/auth.command.d.ts +31 -0
  9. package/dist/service/cognito/command/auth/auth.command.d.ts.map +1 -1
  10. package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts +2 -0
  11. package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts.map +1 -1
  12. package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js +13 -1
  13. package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js.map +1 -1
  14. package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts +35 -0
  15. package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts.map +1 -0
  16. package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js +51 -0
  17. package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js.map +1 -0
  18. package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts +3 -8
  19. package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts.map +1 -1
  20. package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js +24 -17
  21. package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js.map +1 -1
  22. package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.d.ts +56 -0
  23. package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.d.ts.map +1 -0
  24. package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.js +50 -0
  25. package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.js.map +1 -0
  26. package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.d.ts.map +1 -1
  27. package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js +0 -1
  28. package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js.map +1 -1
  29. package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.d.ts +4 -3
  30. package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.d.ts.map +1 -1
  31. package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.js +5 -3
  32. package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.js.map +1 -1
  33. package/dist/service/cognito/command/client/user-pool-client.command.d.ts +3 -1
  34. package/dist/service/cognito/command/client/user-pool-client.command.d.ts.map +1 -1
  35. package/dist/service/cognito/command/hosted/sim-cognito-presented-grant.js +1 -1
  36. package/dist/service/cognito/command/hosted/sim-cognito-presented-grant.js.map +1 -1
  37. package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts +3 -3
  38. package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts.map +1 -1
  39. package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js +5 -4
  40. package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js.map +1 -1
  41. package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -1
  42. package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
  43. package/dist/service/cognito/index.d.ts +1 -0
  44. package/dist/service/cognito/index.d.ts.map +1 -1
  45. package/dist/service/cognito/index.js +1 -0
  46. package/dist/service/cognito/index.js.map +1 -1
  47. package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.d.ts.map +1 -1
  48. package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.js +4 -0
  49. package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.js.map +1 -1
  50. package/dist/service/cognito/sim-cognito-authentication.d.ts +8 -0
  51. package/dist/service/cognito/sim-cognito-authentication.d.ts.map +1 -1
  52. package/dist/service/cognito/sim-cognito-authentication.js +11 -0
  53. package/dist/service/cognito/sim-cognito-authentication.js.map +1 -1
  54. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.d.ts +11 -1
  55. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.d.ts.map +1 -1
  56. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.js +17 -2
  57. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.js.map +1 -1
  58. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.d.ts +41 -0
  59. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.d.ts.map +1 -1
  60. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.js +62 -0
  61. package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.js.map +1 -1
  62. package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts +5 -0
  63. package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts.map +1 -1
  64. package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js +7 -0
  65. package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js.map +1 -1
  66. package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.d.ts +11 -0
  67. package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.d.ts.map +1 -0
  68. package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.js +17 -0
  69. package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.js.map +1 -0
  70. package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.d.ts +61 -0
  71. package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.d.ts.map +1 -0
  72. package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.js +80 -0
  73. package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.js.map +1 -0
  74. package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.d.ts +10 -0
  75. package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.d.ts.map +1 -1
  76. package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.js +22 -0
  77. package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.js.map +1 -1
  78. package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.d.ts +48 -0
  79. package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.d.ts.map +1 -0
  80. package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.js +79 -0
  81. package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.js.map +1 -0
  82. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts +7 -0
  83. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts.map +1 -1
  84. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js +7 -0
  85. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js.map +1 -1
  86. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts +6 -0
  87. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts.map +1 -1
  88. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js +7 -0
  89. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js.map +1 -1
  90. package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts +34 -0
  91. package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts.map +1 -1
  92. package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js +40 -1
  93. package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js.map +1 -1
  94. package/dist/service/lambda/command/create-function/create-function-input.js +1 -1
  95. package/dist/service/lambda/command/create-function/create-function-input.js.map +1 -1
  96. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +17 -0
  97. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  98. package/dist/service/lambda/command/function/sim-lambda-function-commands.js +43 -0
  99. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  100. package/dist/service/lambda/command/list-functions/list-functions-authorizer.d.ts +31 -0
  101. package/dist/service/lambda/command/list-functions/list-functions-authorizer.d.ts.map +1 -0
  102. package/dist/service/lambda/command/list-functions/list-functions-authorizer.js +41 -0
  103. package/dist/service/lambda/command/list-functions/list-functions-authorizer.js.map +1 -0
  104. package/dist/service/lambda/command/list-functions/list-functions.command.d.ts +34 -0
  105. package/dist/service/lambda/command/list-functions/list-functions.command.d.ts.map +1 -0
  106. package/dist/service/lambda/command/list-functions/list-functions.command.js +5 -0
  107. package/dist/service/lambda/command/list-functions/list-functions.command.js.map +1 -0
  108. package/dist/service/lambda/command/list-functions/list-functions.handler.d.ts +35 -0
  109. package/dist/service/lambda/command/list-functions/list-functions.handler.d.ts.map +1 -0
  110. package/dist/service/lambda/command/list-functions/list-functions.handler.js +46 -0
  111. package/dist/service/lambda/command/list-functions/list-functions.handler.js.map +1 -0
  112. package/dist/service/lambda/command/sim-lambda-command.types.d.ts +3 -0
  113. package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
  114. package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.d.ts +27 -0
  115. package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.d.ts.map +1 -0
  116. package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js +37 -0
  117. package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js.map +1 -0
  118. package/dist/service/lambda/command/update-function-code/update-function-code-input.d.ts +16 -0
  119. package/dist/service/lambda/command/update-function-code/update-function-code-input.d.ts.map +1 -0
  120. package/dist/service/lambda/command/update-function-code/update-function-code-input.js +30 -0
  121. package/dist/service/lambda/command/update-function-code/update-function-code-input.js.map +1 -0
  122. package/dist/service/lambda/command/update-function-code/update-function-code.command.d.ts +41 -0
  123. package/dist/service/lambda/command/update-function-code/update-function-code.command.d.ts.map +1 -0
  124. package/dist/service/lambda/command/update-function-code/update-function-code.command.js +5 -0
  125. package/dist/service/lambda/command/update-function-code/update-function-code.command.js.map +1 -0
  126. package/dist/service/lambda/command/update-function-code/update-function-code.handler.d.ts +52 -0
  127. package/dist/service/lambda/command/update-function-code/update-function-code.handler.d.ts.map +1 -0
  128. package/dist/service/lambda/command/update-function-code/update-function-code.handler.js +72 -0
  129. package/dist/service/lambda/command/update-function-code/update-function-code.handler.js.map +1 -0
  130. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts +28 -0
  131. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts.map +1 -0
  132. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js +38 -0
  133. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js.map +1 -0
  134. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.d.ts +23 -0
  135. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.d.ts.map +1 -0
  136. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.js +29 -0
  137. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.js.map +1 -0
  138. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.d.ts +42 -0
  139. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.d.ts.map +1 -0
  140. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.js +5 -0
  141. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.js.map +1 -0
  142. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.d.ts +50 -0
  143. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.d.ts.map +1 -0
  144. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js +61 -0
  145. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js.map +1 -0
  146. package/dist/service/lambda/function/code/lambda-code-source.d.ts +15 -2
  147. package/dist/service/lambda/function/code/lambda-code-source.d.ts.map +1 -1
  148. package/dist/service/lambda/function/code/lambda-code-source.js +19 -14
  149. package/dist/service/lambda/function/code/lambda-code-source.js.map +1 -1
  150. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +6 -0
  151. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
  152. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
  153. package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts +28 -0
  154. package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts.map +1 -1
  155. package/dist/service/lambda/function/code/sim-lambda-executable-code.js +10 -0
  156. package/dist/service/lambda/function/code/sim-lambda-executable-code.js.map +1 -1
  157. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
  158. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +2 -1
  159. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
  160. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +11 -1
  161. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
  162. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +16 -0
  163. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
  164. package/dist/service/lambda/{command/create-function/create-function-environment-names.d.ts → function/environment/lambda-environment-variable-names.d.ts} +1 -1
  165. package/dist/service/lambda/function/environment/lambda-environment-variable-names.d.ts.map +1 -0
  166. package/dist/service/lambda/{command/create-function/create-function-environment-names.js → function/environment/lambda-environment-variable-names.js} +1 -1
  167. package/dist/service/lambda/function/environment/lambda-environment-variable-names.js.map +1 -0
  168. package/dist/service/lambda/{command/create-function/create-function-environment.d.ts → function/environment/lambda-environment-variables.d.ts} +2 -2
  169. package/dist/service/lambda/function/environment/lambda-environment-variables.d.ts.map +1 -0
  170. package/dist/service/lambda/{command/create-function/create-function-environment.js → function/environment/lambda-environment-variables.js} +2 -2
  171. package/dist/service/lambda/function/environment/lambda-environment-variables.js.map +1 -0
  172. package/dist/service/lambda/function/environment/lambda-reserved-variable-names.d.ts.map +1 -0
  173. package/dist/service/lambda/function/environment/lambda-reserved-variable-names.js.map +1 -0
  174. package/dist/service/lambda/function/sim-lambda-function-reconfiguration.d.ts +35 -0
  175. package/dist/service/lambda/function/sim-lambda-function-reconfiguration.d.ts.map +1 -0
  176. package/dist/service/lambda/function/sim-lambda-function-reconfiguration.js +54 -0
  177. package/dist/service/lambda/function/sim-lambda-function-reconfiguration.js.map +1 -0
  178. package/dist/service/lambda/function/sim-lambda-function.d.ts +34 -56
  179. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  180. package/dist/service/lambda/function/sim-lambda-function.js +43 -9
  181. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  182. package/dist/service/lambda/function/sim-lambda-function.type.d.ts +53 -0
  183. package/dist/service/lambda/function/sim-lambda-function.type.d.ts.map +1 -0
  184. package/dist/service/lambda/function/sim-lambda-function.type.js +2 -0
  185. package/dist/service/lambda/function/sim-lambda-function.type.js.map +1 -0
  186. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
  187. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +12 -0
  188. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
  189. package/dist/service/lambda/serve/api/sim-lambda-api-function-input.d.ts +27 -0
  190. package/dist/service/lambda/serve/api/sim-lambda-api-function-input.d.ts.map +1 -0
  191. package/dist/service/lambda/serve/api/sim-lambda-api-function-input.js +76 -0
  192. package/dist/service/lambda/serve/api/sim-lambda-api-function-input.js.map +1 -0
  193. package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.d.ts.map +1 -1
  194. package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.js +19 -58
  195. package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.js.map +1 -1
  196. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  197. package/dist/service/lambda/sim-lambda-commands.js +1 -0
  198. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  199. package/dist/service/lambda/sim-lambda.d.ts +6 -0
  200. package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
  201. package/dist/service/lambda/sim-lambda.js +12 -0
  202. package/dist/service/lambda/sim-lambda.js.map +1 -1
  203. package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts +1 -1
  204. package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts.map +1 -1
  205. package/dist/service/s3/bucket/notification/sim-s3-notification-event.js +7 -1
  206. package/dist/service/s3/bucket/notification/sim-s3-notification-event.js.map +1 -1
  207. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.d.ts.map +1 -1
  208. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js +0 -1
  209. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js.map +1 -1
  210. package/dist/service/s3/command/copy-object/copy-object-builder.d.ts +34 -0
  211. package/dist/service/s3/command/copy-object/copy-object-builder.d.ts.map +1 -0
  212. package/dist/service/s3/command/copy-object/copy-object-builder.js +40 -0
  213. package/dist/service/s3/command/copy-object/copy-object-builder.js.map +1 -0
  214. package/dist/service/s3/command/copy-object/copy-object-source.d.ts +37 -0
  215. package/dist/service/s3/command/copy-object/copy-object-source.d.ts.map +1 -0
  216. package/dist/service/s3/command/copy-object/copy-object-source.js +80 -0
  217. package/dist/service/s3/command/copy-object/copy-object-source.js.map +1 -0
  218. package/dist/service/s3/command/copy-object/copy-object.command.d.ts +41 -0
  219. package/dist/service/s3/command/copy-object/copy-object.command.d.ts.map +1 -0
  220. package/dist/service/s3/command/copy-object/copy-object.command.js +2 -0
  221. package/dist/service/s3/command/copy-object/copy-object.command.js.map +1 -0
  222. package/dist/service/s3/command/copy-object/copy-object.handler.d.ts +43 -0
  223. package/dist/service/s3/command/copy-object/copy-object.handler.d.ts.map +1 -0
  224. package/dist/service/s3/command/copy-object/copy-object.handler.js +76 -0
  225. package/dist/service/s3/command/copy-object/copy-object.handler.js.map +1 -0
  226. package/dist/service/s3/command/object/sim-s3-object-commands.d.ts +4 -0
  227. package/dist/service/s3/command/object/sim-s3-object-commands.d.ts.map +1 -1
  228. package/dist/service/s3/command/object/sim-s3-object-commands.js +7 -0
  229. package/dist/service/s3/command/object/sim-s3-object-commands.js.map +1 -1
  230. package/dist/service/s3/command/sim-s3-command.types.d.ts +1 -0
  231. package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
  232. package/dist/service/s3/error/sim-s3.error.d.ts +11 -0
  233. package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
  234. package/dist/service/s3/error/sim-s3.error.js +13 -0
  235. package/dist/service/s3/error/sim-s3.error.js.map +1 -1
  236. package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
  237. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +4 -0
  238. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
  239. package/dist/service/s3/sim-s3-operations.d.ts +2 -0
  240. package/dist/service/s3/sim-s3-operations.d.ts.map +1 -1
  241. package/dist/service/s3/sim-s3-operations.js +4 -0
  242. package/dist/service/s3/sim-s3-operations.js.map +1 -1
  243. package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.d.ts +2 -0
  244. package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.d.ts.map +1 -1
  245. package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.js +3 -0
  246. package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.js.map +1 -1
  247. package/dist/service/wafv2/index.d.ts +1 -0
  248. package/dist/service/wafv2/index.d.ts.map +1 -1
  249. package/dist/service/wafv2/index.js.map +1 -1
  250. package/dist/service/wafv2/managed/sim-waf-managed-group-statement.d.ts.map +1 -1
  251. package/dist/service/wafv2/managed/sim-waf-managed-group-statement.js +1 -0
  252. package/dist/service/wafv2/managed/sim-waf-managed-group-statement.js.map +1 -1
  253. package/dist/service/wafv2/sim-wafv2-commands.d.ts.map +1 -1
  254. package/dist/service/wafv2/sim-wafv2-commands.js +3 -0
  255. package/dist/service/wafv2/sim-wafv2-commands.js.map +1 -1
  256. package/dist/service/wafv2/sim-wafv2.d.ts.map +1 -1
  257. package/dist/service/wafv2/sim-wafv2.js +1 -0
  258. package/dist/service/wafv2/sim-wafv2.js.map +1 -1
  259. package/dist/service/wafv2/statement/sim-waf-rate-based-input.d.ts +49 -0
  260. package/dist/service/wafv2/statement/sim-waf-rate-based-input.d.ts.map +1 -0
  261. package/dist/service/wafv2/statement/sim-waf-rate-based-input.js +94 -0
  262. package/dist/service/wafv2/statement/sim-waf-rate-based-input.js.map +1 -0
  263. package/dist/service/wafv2/statement/sim-waf-rate-based.d.ts +22 -0
  264. package/dist/service/wafv2/statement/sim-waf-rate-based.d.ts.map +1 -0
  265. package/dist/service/wafv2/statement/sim-waf-rate-based.js +41 -0
  266. package/dist/service/wafv2/statement/sim-waf-rate-based.js.map +1 -0
  267. package/dist/service/wafv2/statement/sim-waf-rate-based.type.d.ts +18 -0
  268. package/dist/service/wafv2/statement/sim-waf-rate-based.type.d.ts.map +1 -0
  269. package/dist/service/wafv2/statement/sim-waf-rate-based.type.js +2 -0
  270. package/dist/service/wafv2/statement/sim-waf-rate-based.type.js.map +1 -0
  271. package/dist/service/wafv2/statement/sim-waf-rate-counter.d.ts +29 -0
  272. package/dist/service/wafv2/statement/sim-waf-rate-counter.d.ts.map +1 -0
  273. package/dist/service/wafv2/statement/sim-waf-rate-counter.js +35 -0
  274. package/dist/service/wafv2/statement/sim-waf-rate-counter.js.map +1 -0
  275. package/dist/service/wafv2/statement/sim-waf-statement.d.ts +6 -0
  276. package/dist/service/wafv2/statement/sim-waf-statement.d.ts.map +1 -1
  277. package/dist/service/wafv2/statement/sim-waf-statement.js +4 -0
  278. package/dist/service/wafv2/statement/sim-waf-statement.js.map +1 -1
  279. package/dist/service/wafv2/statement/sim-waf-statement.type.d.ts +2 -1
  280. package/dist/service/wafv2/statement/sim-waf-statement.type.d.ts.map +1 -1
  281. package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.d.ts +10 -0
  282. package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.d.ts.map +1 -0
  283. package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.js +40 -0
  284. package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.js.map +1 -0
  285. package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.d.ts.map +1 -1
  286. package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.js +0 -5
  287. package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.js.map +1 -1
  288. package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.d.ts.map +1 -1
  289. package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.js +25 -2
  290. package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.js.map +1 -1
  291. package/dist/service/wafv2/web-acl/sim-waf-rule.type.d.ts +6 -0
  292. package/dist/service/wafv2/web-acl/sim-waf-rule.type.d.ts.map +1 -1
  293. package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.d.ts.map +1 -1
  294. package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.js +16 -1
  295. package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.js.map +1 -1
  296. package/dist/util/clock/sim-clock-control.d.ts +8 -0
  297. package/dist/util/clock/sim-clock-control.d.ts.map +1 -1
  298. package/dist/util/clock/sim-clock-control.js +10 -1
  299. package/dist/util/clock/sim-clock-control.js.map +1 -1
  300. package/package.json +1 -1
  301. package/dist/service/lambda/command/create-function/create-function-environment-names.d.ts.map +0 -1
  302. package/dist/service/lambda/command/create-function/create-function-environment-names.js.map +0 -1
  303. package/dist/service/lambda/command/create-function/create-function-environment.d.ts.map +0 -1
  304. package/dist/service/lambda/command/create-function/create-function-environment.js.map +0 -1
  305. package/dist/service/lambda/command/create-function/lambda-reserved-variable-names.d.ts.map +0 -1
  306. package/dist/service/lambda/command/create-function/lambda-reserved-variable-names.js.map +0 -1
  307. /package/dist/service/lambda/{command/create-function → function/environment}/lambda-reserved-variable-names.d.ts +0 -0
  308. /package/dist/service/lambda/{command/create-function → function/environment}/lambda-reserved-variable-names.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-issued-token.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-issued-token.ts"],"names":[],"mappings":"AAEA,UAAU,+BAA+B;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;;GAQG;AACH,qBAAa,qBAAqB;IAChC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,QAAQ,EAAE,IAAI,CAAC;IAC/B,SAAgB,SAAS,EAAE,IAAI,CAAC;IAEhC;;;OAGG;IACH,SAAgB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAE1C,YAAY,UAAU,EAAE,+BAA+B,EAOtD;IAED;;;;;;;;OAQG;IACH,IAAI,WAAW,IAAI,OAAO,CAKzB;IAED;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAE9B;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/B;CACF"}
1
+ {"version":3,"file":"sim-cognito-issued-token.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-issued-token.ts"],"names":[],"mappings":"AAEA,UAAU,+BAA+B;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAEhD;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,qBAAa,qBAAqB;IAChC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,QAAQ,EAAE,IAAI,CAAC;IAC/B,SAAgB,SAAS,EAAE,IAAI,CAAC;IAEhC;;;OAGG;IACH,SAAgB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAE1C;;;OAGG;IACH,SAAgB,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAE5C,YAAY,UAAU,EAAE,+BAA+B,EAQtD;IAED;;;;;;;;OAQG;IACH,IAAI,WAAW,IAAI,OAAO,CAKzB;IAED;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAE9B;IAED;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAE9B;IAED;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAE5B;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,SAAS,EAAE,IAAI,GAAG,qBAAqB,CAMnD;IAED;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,qBAAqB,CAO/D;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/B;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK;CAWd"}
@@ -19,6 +19,11 @@ export class SimCognitoIssuedToken {
19
19
  * none of: the scope of one of those is settled where the token is signed.
20
20
  */
21
21
  scopes;
22
+ /**
23
+ * When a rotated-out refresh token stops working, which is undefined for
24
+ * every token nothing has replaced.
25
+ */
26
+ revokedAt;
22
27
  constructor(properties) {
23
28
  this.value = properties.value;
24
29
  this.username = properties.username;
@@ -26,6 +31,7 @@ export class SimCognitoIssuedToken {
26
31
  this.issuedAt = properties.issuedAt;
27
32
  this.expiresAt = properties.expiresAt;
28
33
  this.scopes = properties.scopes ?? [];
34
+ this.revokedAt = properties.revokedAt;
29
35
  }
30
36
  /**
31
37
  * Whether this token may act on the user it was issued to.
@@ -46,6 +52,47 @@ export class SimCognitoIssuedToken {
46
52
  isExpiredAt(now) {
47
53
  return now.getTime() >= this.expiresAt.getTime();
48
54
  }
55
+ /**
56
+ * Whether this token has been spent by a rotation that replaced it.
57
+ */
58
+ isRevokedAt(now) {
59
+ return this.revokedAt !== undefined && now >= this.revokedAt;
60
+ }
61
+ /**
62
+ * Whether this token is worth remembering any longer.
63
+ */
64
+ isSpentAt(now) {
65
+ return this.isExpiredAt(now) || this.isRevokedAt(now);
66
+ }
67
+ /**
68
+ * This token as it is once a rotation has replaced it.
69
+ *
70
+ * It goes on working until the app client's retry grace period is up, so a
71
+ * client retrying a request whose answer it never saw is answered rather
72
+ * than signed out. A token already rotated out keeps the window it was
73
+ * given, so retrying inside the grace period does not extend it.
74
+ */
75
+ rotatedOutAt(revokedAt) {
76
+ if (this.revokedAt !== undefined) {
77
+ return this;
78
+ }
79
+ return new SimCognitoIssuedToken({ ...this.parts(), revokedAt });
80
+ }
81
+ /**
82
+ * The token that replaces this one when a rotation spends it.
83
+ *
84
+ * The replacement runs out when this token would have, rather than starting
85
+ * a fresh `RefreshTokenValidity`, which is what real Cognito does: rotating
86
+ * a session cannot extend it indefinitely.
87
+ */
88
+ replacedBy(value, issuedAt) {
89
+ return new SimCognitoIssuedToken({
90
+ ...this.parts(),
91
+ value,
92
+ issuedAt,
93
+ revokedAt: undefined,
94
+ });
95
+ }
49
96
  /**
50
97
  * Whether this token was issued to an app client.
51
98
  *
@@ -55,5 +102,20 @@ export class SimCognitoIssuedToken {
55
102
  isFor(clientId) {
56
103
  return this.clientId === clientId;
57
104
  }
105
+ /**
106
+ * What this token is made of, so a copy of it can be made with one part
107
+ * changed.
108
+ */
109
+ parts() {
110
+ return {
111
+ value: this.value,
112
+ username: this.username,
113
+ clientId: this.clientId,
114
+ issuedAt: this.issuedAt,
115
+ expiresAt: this.expiresAt,
116
+ scopes: this.scopes,
117
+ revokedAt: this.revokedAt,
118
+ };
119
+ }
58
120
  }
59
121
  //# sourceMappingURL=sim-cognito-issued-token.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-issued-token.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-issued-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAgBpF;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IAChB,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,QAAQ,CAAO;IACf,SAAS,CAAO;IAEhC;;;OAGG;IACa,MAAM,CAAoB;IAE1C,YAAY,UAA2C;QACrD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC;IACxC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,WAAW;QACb,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CACnD,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,GAAS;QACnB,OAAO,GAAG,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAgB;QACpB,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC;IACpC,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cognito-issued-token.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-issued-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAuBpF;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IAChB,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,QAAQ,CAAO;IACf,SAAS,CAAO;IAEhC;;;OAGG;IACa,MAAM,CAAoB;IAE1C;;;OAGG;IACa,SAAS,CAAmB;IAE5C,YAAY,UAA2C;QACrD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,C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AI,qBAAqB,CAAC;YAC/B,GAAG,IAAI,CAAC,KAAK,EAAE;YACf,KAAK;YACL,QAAQ;YACR,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAgB;QACpB,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC;IACpC,CAAC;IAED;;;OAGG;IACK,KAAK;QACX,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF"}
@@ -70,6 +70,11 @@ export declare class SimCognitoPoolAuth {
70
70
  * Remember a refresh token this pool has issued.
71
71
  */
72
72
  addRefreshToken(token: SimCognitoIssuedToken): void;
73
+ /**
74
+ * Stop honouring a refresh token from a moment on, because a rotation has
75
+ * replaced it.
76
+ */
77
+ revokeRefreshTokenAt(token: SimCognitoIssuedToken, revokedAt: Date): void;
73
78
  /**
74
79
  * Remember an access token this pool has issued.
75
80
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-pool-auth.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-pool-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAA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6B,GACrC,qBAAqB,CAEvB;IAED;;OAEG;IACH,gBAAgB,CACd,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,qBAAqB,GAAG,SAAS,CAEnC;IAED;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAEhE;IAED;;OAEG;IACH,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAEnE;IAED;;;OAGG;IACH,uBAAuB,CACrB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,IAAI,GACR,6BAA6B,GAAG,SAAS,CAE3C;IAED;;OAEG;IACH,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAEtD;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE9B;CACF"}
1
+ {"version":3,"file":"sim-cognito-pool-auth.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-pool-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAEvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAE5F,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAkB;;IAC7B;;OAEG;IACH,SAAgB,iBAAiB,kCAAyC;IA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E;IAED;;OAEG;IACH,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAEnE;IAED;;;OAGG;IACH,uBAAuB,CACrB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,IAAI,GACR,6BAA6B,GAAG,SAAS,CAE3C;IAED;;OAEG;IACH,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAEtD;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE9B;CACF"}
@@ -85,6 +85,13 @@ export class SimCognitoPoolAuth {
85
85
  addRefreshToken(token) {
86
86
  this.tokens.addRefreshToken(token);
87
87
  }
88
+ /**
89
+ * Stop honouring a refresh token from a moment on, because a rotation has
90
+ * replaced it.
91
+ */
92
+ revokeRefreshTokenAt(token, revokedAt) {
93
+ this.tokens.revokeRefreshTokenAt(token, revokedAt);
94
+ }
88
95
  /**
89
96
  * Remember an access token this pool has issued.
90
97
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-pool-auth.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-pool-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAGhG,OAAO,EACL,0BAA0B,GAE3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAG7F,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EACL,0BAA0B,GAE3B,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACa,iBAAiB,GAAG,IAAI,+BAA+B,EAAE,CAAC;IAEzD,QAAQ,GAAG,IAAI,0BAA0B,EAAE,CAAC;IAC5C,YAAY,GAAG,IAAI,kCAAkC,EAAE,CAAC;IACx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CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,gBAAgB,CACd,KAAyB;QAEzB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,KAAa;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,OAAsC;QAC3D,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,uBAAuB,CACrB,KAAyB,EACzB,GAAS;QAET,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,KAAyB;QAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,QAAgB;QACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cognito-pool-auth.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-pool-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAGhG,OAAO,EACL,0BAA0B,GAE3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAG7F,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EACL,0BAA0B,GAE3B,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACa,iBAAi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AAe;QAChE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,KAA4B;QACzC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,mBAAmB,CACjB,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,gBAAgB,CACd,KAAyB;QAEzB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,KAAa;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,OAAsC;QAC3D,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,uBAAuB,CACrB,KAAyB,EACzB,GAAS;QAET,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,KAAyB;QAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,QAAgB;QACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Read the refresh token a request was made with, or refuse a request that
3
+ * carries none.
4
+ *
5
+ * `GetTokensFromRefreshToken` names the token in an input of its own rather
6
+ * than among `AuthParameters`, which is why this is not the check
7
+ * `REFRESH_TOKEN_AUTH` makes. It is required on real Cognito, so an empty one
8
+ * is as missing as an absent one.
9
+ */
10
+ export declare function requireSimCognitoRefreshTokenInput(value: string | undefined): string;
11
+ //# sourceMappingURL=sim-cognito-refresh-token-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refresh-token-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,CAQR"}
@@ -0,0 +1,17 @@
1
+ import { SimCognitoInvalidParameterException } from "../../error/sim-cognito.error.js";
2
+ /**
3
+ * Read the refresh token a request was made with, or refuse a request that
4
+ * carries none.
5
+ *
6
+ * `GetTokensFromRefreshToken` names the token in an input of its own rather
7
+ * than among `AuthParameters`, which is why this is not the check
8
+ * `REFRESH_TOKEN_AUTH` makes. It is required on real Cognito, so an empty one
9
+ * is as missing as an absent one.
10
+ */
11
+ export function requireSimCognitoRefreshTokenInput(value) {
12
+ if (value === undefined || value === "") {
13
+ throw new SimCognitoInvalidParameterException("Missing required parameter RefreshToken");
14
+ }
15
+ return value;
16
+ }
17
+ //# sourceMappingURL=sim-cognito-refresh-token-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refresh-token-input.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,UAAU,kCAAkC,CAChD,KAAyB;IAEzB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,mCAAmC,CAC3C,yCAAyC,CAC1C,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { AsyncMappedFactory } from "@kensio/part-factory";
2
+ import type { SimAws } from "../../../aws/sim-aws.js";
3
+ import type { SimCognitoRefreshTokenRotationType } from "../client/sim-cognito-refresh-token-rotation.js";
4
+ /**
5
+ * What a test asks for when it wants a session it can renew.
6
+ */
7
+ export interface SimCognitoRefreshableSessionInput {
8
+ readonly poolName: string;
9
+ readonly clientName: string;
10
+ readonly username: string;
11
+ readonly password: string;
12
+ /**
13
+ * The flows the app client allows. A rotating client is created without
14
+ * `ALLOW_REFRESH_TOKEN_AUTH`, which is what `aws-cdk-lib` synthesizes.
15
+ */
16
+ readonly explicitAuthFlows: readonly string[];
17
+ /**
18
+ * Whether the app client is a confidential one, whose requests have to carry
19
+ * its secret.
20
+ */
21
+ readonly generateSecret: boolean;
22
+ /**
23
+ * How long the refresh token lasts, in the app client's default unit of
24
+ * days. Left out, it lasts the thirty days Cognito gives one.
25
+ */
26
+ readonly refreshTokenValidity: number | undefined;
27
+ /**
28
+ * Whether the app client rotates its refresh tokens, and for how long it
29
+ * goes on honouring one it rotated out.
30
+ */
31
+ readonly refreshTokenRotation: SimCognitoRefreshTokenRotationType | undefined;
32
+ }
33
+ /**
34
+ * A pool, an app client, and a signed-in user holding a refresh token.
35
+ */
36
+ export interface SimCognitoRefreshableSession {
37
+ readonly userPoolId: string;
38
+ readonly clientId: string;
39
+ /**
40
+ * The app client's secret, which only a client created with one has.
41
+ */
42
+ readonly clientSecret: string | undefined;
43
+ readonly username: string;
44
+ readonly refreshToken: string;
45
+ }
46
+ /**
47
+ * Signs a user in through a client-side sign-in and hands back the refresh
48
+ * token it was given.
49
+ *
50
+ * Four commands stand between a test and a refresh token, and a test about
51
+ * renewing a session is about none of them.
52
+ *
53
+ * ```typescript
54
+ * const session = await simCognitoRefreshableSessionFactory.make(
55
+ * { refreshTokenRotation: { Feature: "ENABLED" } },
56
+ * simAws,
57
+ * );
58
+ * ```
59
+ */
60
+ export declare const simCognitoRefreshableSessionFactory: AsyncMappedFactory<SimCognitoRefreshableSessionInput, SimCognitoRefreshableSession, SimAws>;
61
+ //# sourceMappingURL=sim-cognito-refreshable-session.factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refreshable-session.factory.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AAG1G;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAE9C;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IAElD;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,EAAE,kCAAkC,GAAG,SAAS,CAAC;CAC/E;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mCAAmC,6FA6E/C,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { AsyncMappedFactory } from "@kensio/part-factory";
2
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
3
+ import { simCognitoSecretHash } from "./sim-cognito-secret-hash.js";
4
+ /**
5
+ * Signs a user in through a client-side sign-in and hands back the refresh
6
+ * token it was given.
7
+ *
8
+ * Four commands stand between a test and a refresh token, and a test about
9
+ * renewing a session is about none of them.
10
+ *
11
+ * ```typescript
12
+ * const session = await simCognitoRefreshableSessionFactory.make(
13
+ * { refreshTokenRotation: { Feature: "ENABLED" } },
14
+ * simAws,
15
+ * );
16
+ * ```
17
+ */
18
+ export const simCognitoRefreshableSessionFactory = new AsyncMappedFactory(() => ({
19
+ poolName: "myapp-users",
20
+ clientName: "web",
21
+ username: "ada",
22
+ password: "Correct-horse-1",
23
+ explicitAuthFlows: ["ALLOW_USER_PASSWORD_AUTH", "ALLOW_REFRESH_TOKEN_AUTH"],
24
+ generateSecret: false,
25
+ refreshTokenValidity: undefined,
26
+ refreshTokenRotation: undefined,
27
+ }), async (input, simAws) => {
28
+ const cognito = simAws.cognitoIdentityProvider();
29
+ const pool = await cognito.createUserPool({
30
+ input: { PoolName: input.poolName },
31
+ });
32
+ const userPoolId = pool.UserPool?.Id;
33
+ assertDefined(userPoolId, "the created sim Cognito user pool id");
34
+ const appClient = await cognito.createUserPoolClient({
35
+ input: {
36
+ UserPoolId: userPoolId,
37
+ ClientName: input.clientName,
38
+ ExplicitAuthFlows: input.explicitAuthFlows,
39
+ GenerateSecret: input.generateSecret,
40
+ RefreshTokenValidity: input.refreshTokenValidity,
41
+ RefreshTokenRotation: input.refreshTokenRotation,
42
+ },
43
+ });
44
+ const clientId = appClient.UserPoolClient?.ClientId;
45
+ assertDefined(clientId, "the created sim Cognito app client id");
46
+ await cognito.adminCreateUser({
47
+ input: { UserPoolId: userPoolId, Username: input.username },
48
+ });
49
+ await cognito.adminSetUserPassword({
50
+ input: {
51
+ UserPoolId: userPoolId,
52
+ Username: input.username,
53
+ Password: input.password,
54
+ Permanent: true,
55
+ },
56
+ });
57
+ const signedIn = await cognito.initiateAuth({
58
+ input: {
59
+ ClientId: clientId,
60
+ AuthFlow: "USER_PASSWORD_AUTH",
61
+ AuthParameters: {
62
+ USERNAME: input.username,
63
+ PASSWORD: input.password,
64
+ ...(appClient.UserPoolClient?.ClientSecret !== undefined && {
65
+ SECRET_HASH: simCognitoSecretHash(input.username, clientId, appClient.UserPoolClient.ClientSecret),
66
+ }),
67
+ },
68
+ },
69
+ });
70
+ const refreshToken = signedIn.AuthenticationResult?.RefreshToken;
71
+ assertDefined(refreshToken, "the issued sim Cognito refresh token");
72
+ return {
73
+ userPoolId,
74
+ clientId,
75
+ clientSecret: appClient.UserPoolClient?.ClientSecret,
76
+ username: input.username,
77
+ refreshToken,
78
+ };
79
+ });
80
+ //# sourceMappingURL=sim-cognito-refreshable-session.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refreshable-session.factory.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAmDpE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,kBAAkB,CAKvE,GAAG,EAAE,CAAC,CAAC;IACL,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,iBAAiB;IAC3B,iBAAiB,EAAE,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;IAC3E,cAAc,EAAE,KAAK;IACrB,oBAAoB,EAAE,SAAS;IAC/B,oBAAoB,EAAE,SAAS;CAChC,CAAC,E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QAAQ,EAAE,oBAAoB;YAC9B,cAAc,EAAE;gBACd,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,YAAY,KAAK,SAAS,IAAI;oBAC1D,WAAW,EAAE,oBAAoB,CAC/B,KAAK,CAAC,QAAQ,EACd,QAAQ,EACR,SAAS,CAAC,cAAc,CAAC,YAAY,CACtC;iBACF,CAAC;aACH;SACF;KACF,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,QAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC;IACjE,aAAa,CAAC,YAAY,EAAE,sCAAsC,CAAC,CAAC;IAEpE,OAAO;QACL,UAAU;QACV,QAAQ;QACR,YAAY,EAAE,SAAS,CAAC,cAAc,EAAE,YAAY;QACpD,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,YAAY;KACb,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { SimCognitoUserPoolClient } from "./sim-cognito-user-pool-client.js";
1
2
  /**
2
3
  * Generate an app client secret.
3
4
  *
@@ -7,4 +8,13 @@
7
8
  * on.
8
9
  */
9
10
  export declare function makeSimCognitoClientSecret(): string;
11
+ /**
12
+ * Refuse a request whose `ClientSecret` is missing or wrong.
13
+ *
14
+ * `GetTokensFromRefreshToken` proves the caller with the secret itself rather
15
+ * than with a `SECRET_HASH`, because the request names no user for a hash to
16
+ * be computed over. A client without a secret needs none, and one sent anyway
17
+ * is ignored, as real Cognito ignores it.
18
+ */
19
+ export declare function requireSimCognitoClientSecret(client: SimCognitoUserPoolClient, clientSecret: string | undefined): void;
10
20
  //# sourceMappingURL=sim-cognito-client-secret.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-client-secret.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-client-secret.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAKnD"}
1
+ {"version":3,"file":"sim-cognito-client-secret.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-client-secret.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AASlF;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAKnD;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,wBAAwB,EAChC,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,IAAI,CAYN"}
@@ -1,4 +1,9 @@
1
+ /* oxlint-disable security/detect-possible-timing-attacks -- this is a
2
+ simulator in one process, where the client secret is checked so a test
3
+ notices one it forgot to send, rather than as a defence against anyone
4
+ measuring how long the check took. */
1
5
  import { faker } from "@faker-js/faker";
6
+ import { SimCognitoNotAuthorizedException } from "../../error/sim-cognito.error.js";
2
7
  /**
3
8
  * Real client secrets are fifty-two lowercase alphanumerics. The length is
4
9
  * worth matching because application code sometimes carries an assertion or a
@@ -19,4 +24,21 @@ export function makeSimCognitoClientSecret() {
19
24
  casing: "lower",
20
25
  });
21
26
  }
27
+ /**
28
+ * Refuse a request whose `ClientSecret` is missing or wrong.
29
+ *
30
+ * `GetTokensFromRefreshToken` proves the caller with the secret itself rather
31
+ * than with a `SECRET_HASH`, because the request names no user for a hash to
32
+ * be computed over. A client without a secret needs none, and one sent anyway
33
+ * is ignored, as real Cognito ignores it.
34
+ */
35
+ export function requireSimCognitoClientSecret(client, clientSecret) {
36
+ const { secret } = client;
37
+ if (secret === undefined) {
38
+ return;
39
+ }
40
+ if (clientSecret !== secret) {
41
+ throw new SimCognitoNotAuthorizedException(`Invalid client secret for client ${client.id}.`);
42
+ }
43
+ }
22
44
  //# sourceMappingURL=sim-cognito-client-secret.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-client-secret.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-client-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/B,MAAM,EAAE,kBAAkB;QAC1B,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"sim-cognito-client-secret.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-client-secret.ts"],"names":[],"mappings":"AAAA;;;wCAGwC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAGpF;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/B,MAAM,EAAE,kBAAkB;QAC1B,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CAC3C,MAAgC,EAChC,YAAgC;IAEhC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO;IACT,CAAC;IAED,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;QAC5B,MAAM,IAAI,gCAAgC,CACxC,oCAAoC,MAAM,CAAC,EAAE,GAAG,CACjD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The refresh token rotation setting of an app client, in the shape a request
3
+ * sets it and a described client reports it.
4
+ *
5
+ * https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RefreshTokenRotationType.html
6
+ */
7
+ export interface SimCognitoRefreshTokenRotationType {
8
+ readonly Feature?: string | undefined;
9
+ readonly RetryGracePeriodSeconds?: number | undefined;
10
+ }
11
+ /**
12
+ * Whether an app client rotates its refresh tokens, and for how long it goes
13
+ * on honouring the one it rotated out.
14
+ *
15
+ * Rotation changes which operation renews a session.
16
+ * `GetTokensFromRefreshToken` answers a rotating client with a replacement
17
+ * refresh token, and `REFRESH_TOKEN_AUTH` is not available to one at all.
18
+ *
19
+ * The grace period is what lets a client retry a request whose answer it never
20
+ * saw: the spent token goes on working for that many seconds, so a retry with
21
+ * it succeeds rather than signing the user out.
22
+ */
23
+ export declare class SimCognitoRefreshTokenRotation {
24
+ /**
25
+ * The feature as the request wrote it, which is what Cognito reports back.
26
+ */
27
+ readonly feature: string;
28
+ /**
29
+ * How many seconds a rotated-out refresh token keeps working. A client that
30
+ * asked for no grace period gets none, so its spent token stops working the
31
+ * moment the replacement is issued.
32
+ */
33
+ readonly retryGracePeriodSeconds: number;
34
+ private readonly requested;
35
+ constructor(requested: SimCognitoRefreshTokenRotationType | undefined);
36
+ private static requireFeature;
37
+ private static requireGraceSeconds;
38
+ /**
39
+ * Whether this client rotates its refresh tokens.
40
+ */
41
+ get enabled(): boolean;
42
+ /**
43
+ * The setting as a described app client reports it, which is only when the
44
+ * request set it. A client nobody configured for rotation reports none.
45
+ */
46
+ toOutput(): SimCognitoRefreshTokenRotationType | undefined;
47
+ }
48
+ //# sourceMappingURL=sim-cognito-refresh-token-rotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refresh-token-rotation.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,8BAA8B;IACzC;;OAEG;IACH,SAAgB,OAAO,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,SAAgB,uBAAuB,EAAE,MAAM,CAAC;IAEhD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiD;IAE3E,YAAY,SAAS,EAAE,kCAAkC,GAAG,SAAS,EASpE;IAED,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAgBlC;;OAEG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;OAGG;IACH,QAAQ,IAAI,kCAAkC,GAAG,SAAS,CAEzD;CACF"}
@@ -0,0 +1,79 @@
1
+ import { SimCognitoInvalidParameterException } from "../../error/sim-cognito.error.js";
2
+ const enabled = "ENABLED";
3
+ const disabled = "DISABLED";
4
+ const features = [enabled, disabled];
5
+ /**
6
+ * The longest grace period Cognito allows a rotated-out refresh token.
7
+ */
8
+ const mostGraceSeconds = 60;
9
+ /**
10
+ * The grace period a client that asked for none gets, which is none: a
11
+ * rotated-out token stops working as soon as its replacement is issued.
12
+ */
13
+ const defaultGraceSeconds = 0;
14
+ /**
15
+ * Whether an app client rotates its refresh tokens, and for how long it goes
16
+ * on honouring the one it rotated out.
17
+ *
18
+ * Rotation changes which operation renews a session.
19
+ * `GetTokensFromRefreshToken` answers a rotating client with a replacement
20
+ * refresh token, and `REFRESH_TOKEN_AUTH` is not available to one at all.
21
+ *
22
+ * The grace period is what lets a client retry a request whose answer it never
23
+ * saw: the spent token goes on working for that many seconds, so a retry with
24
+ * it succeeds rather than signing the user out.
25
+ */
26
+ export class SimCognitoRefreshTokenRotation {
27
+ /**
28
+ * The feature as the request wrote it, which is what Cognito reports back.
29
+ */
30
+ feature;
31
+ /**
32
+ * How many seconds a rotated-out refresh token keeps working. A client that
33
+ * asked for no grace period gets none, so its spent token stops working the
34
+ * moment the replacement is issued.
35
+ */
36
+ retryGracePeriodSeconds;
37
+ requested;
38
+ constructor(requested) {
39
+ this.requested = requested;
40
+ this.feature = SimCognitoRefreshTokenRotation.requireFeature(requested?.Feature);
41
+ this.retryGracePeriodSeconds =
42
+ SimCognitoRefreshTokenRotation.requireGraceSeconds(requested?.RetryGracePeriodSeconds);
43
+ }
44
+ static requireFeature(value) {
45
+ if (value === undefined) {
46
+ return disabled;
47
+ }
48
+ if (!features.includes(value)) {
49
+ throw new SimCognitoInvalidParameterException(`RefreshTokenRotation Feature '${value}' is not a Cognito setting: ` +
50
+ `use one of ${features.join(", ")}`);
51
+ }
52
+ return value;
53
+ }
54
+ static requireGraceSeconds(value) {
55
+ if (value === undefined) {
56
+ return defaultGraceSeconds;
57
+ }
58
+ if (!Number.isSafeInteger(value) || value < 0 || value > mostGraceSeconds) {
59
+ throw new SimCognitoInvalidParameterException(`RefreshTokenRotation RetryGracePeriodSeconds of ${String(value)} is ` +
60
+ `outside the range Cognito allows: a whole number of seconds ` +
61
+ `between 0 and ${String(mostGraceSeconds)}`);
62
+ }
63
+ return value;
64
+ }
65
+ /**
66
+ * Whether this client rotates its refresh tokens.
67
+ */
68
+ get enabled() {
69
+ return this.feature === enabled;
70
+ }
71
+ /**
72
+ * The setting as a described app client reports it, which is only when the
73
+ * request set it. A client nobody configured for rotation reports none.
74
+ */
75
+ toOutput() {
76
+ return this.requested;
77
+ }
78
+ }
79
+ //# sourceMappingURL=sim-cognito-refresh-token-rotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-refresh-token-rotation.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAEvF,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5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8DAA8D;gBAC9D,iBAAiB,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAC9C,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC;IAClC,CAAC;IAED;;;OAGG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
1
  import { SimCognitoExplicitAuthFlows } from "./sim-cognito-explicit-auth-flows.js";
2
2
  import { SimCognitoOAuthSettings, type SimCognitoOAuthSettingsType } from "./sim-cognito-oauth-settings.js";
3
3
  import { SimCognitoPreventUserExistenceErrors } from "./sim-cognito-prevent-user-existence-errors.js";
4
+ import { SimCognitoRefreshTokenRotation, type SimCognitoRefreshTokenRotationType } from "./sim-cognito-refresh-token-rotation.js";
4
5
  import { SimCognitoTokenValidity, type SimCognitoTokenValidityInput } from "./sim-cognito-token-validity.js";
5
6
  /**
6
7
  * The app client properties a request can set.
@@ -13,6 +14,7 @@ export interface SimCognitoUserPoolClientSettingsProperties extends SimCognitoTo
13
14
  readonly ClientName?: string | undefined;
14
15
  readonly ExplicitAuthFlows?: readonly string[] | undefined;
15
16
  readonly PreventUserExistenceErrors?: string | undefined;
17
+ readonly RefreshTokenRotation?: SimCognitoRefreshTokenRotationType | undefined;
16
18
  }
17
19
  /**
18
20
  * The settable properties of one simulated app client.
@@ -28,6 +30,11 @@ export declare class SimCognitoUserPoolClientSettings {
28
30
  readonly explicitAuthFlows: SimCognitoExplicitAuthFlows;
29
31
  readonly preventUserExistenceErrors: SimCognitoPreventUserExistenceErrors;
30
32
  readonly tokenValidity: SimCognitoTokenValidity;
33
+ /**
34
+ * Whether this client rotates its refresh tokens, which decides what
35
+ * renews a session made through it.
36
+ */
37
+ readonly refreshTokenRotation: SimCognitoRefreshTokenRotation;
31
38
  /**
32
39
  * What this client may do at the pool's hosted domain.
33
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-user-pool-client-settings.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,KAAK,2BAA2B,EACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,EAClC,MAAM,iCAAiC,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,0CACf,SAAQ,4BAA4B,EAAE,2BAA2B;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1D;AAED;;;;;;;;GAQG;AACH,qBAAa,gCAAgC;IAC3C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,iBAAiB,EAAE,2BAA2B,CAAC;IAC/D,SAAgB,0BAA0B,EAAE,oCAAoC,CAAC;IACjF,SAAgB,aAAa,EAAE,uBAAuB,CAAC;IAEvD;;OAEG;IACH,SAAgB,KAAK,EAAE,uBAAuB,CAAC;IAE/C,YAAY,UAAU,EAAE,0CAA0C,EAajE;CACF"}
1
+ {"version":3,"file":"sim-cognito-user-pool-client-settings.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,KAAK,2BAA2B,EACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EACL,8BAA8B,EAC9B,KAAK,kCAAkC,EACxC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,EAClC,MAAM,iCAAiC,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,0CACf,SAAQ,4BAA4B,EAAE,2BAA2B;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzD,QAAQ,CAAC,oBAAoB,CAAC,EAC1B,kCAAkC,GAClC,SAAS,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,qBAAa,gCAAgC;IAC3C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,iBAAiB,EAAE,2BAA2B,CAAC;IAC/D,SAAgB,0BAA0B,EAAE,oCAAoC,CAAC;IACjF,SAAgB,aAAa,EAAE,uBAAuB,CAAC;IAEvD;;;OAGG;IACH,SAAgB,oBAAoB,EAAE,8BAA8B,CAAC;IAErE;;OAEG;IACH,SAAgB,KAAK,EAAE,uBAAuB,CAAC;IAE/C,YAAY,UAAU,EAAE,0CAA0C,EAgBjE;CACF"}
@@ -2,6 +2,7 @@ import { SimCognitoName } from "../sim-cognito-name.js";
2
2
  import { SimCognitoExplicitAuthFlows } from "./sim-cognito-explicit-auth-flows.js";
3
3
  import { SimCognitoOAuthSettings, } from "./sim-cognito-oauth-settings.js";
4
4
  import { SimCognitoPreventUserExistenceErrors } from "./sim-cognito-prevent-user-existence-errors.js";
5
+ import { SimCognitoRefreshTokenRotation, } from "./sim-cognito-refresh-token-rotation.js";
5
6
  import { SimCognitoTokenValidity, } from "./sim-cognito-token-validity.js";
6
7
  /**
7
8
  * The settable properties of one simulated app client.
@@ -17,6 +18,11 @@ export class SimCognitoUserPoolClientSettings {
17
18
  explicitAuthFlows;
18
19
  preventUserExistenceErrors;
19
20
  tokenValidity;
21
+ /**
22
+ * Whether this client rotates its refresh tokens, which decides what
23
+ * renews a session made through it.
24
+ */
25
+ refreshTokenRotation;
20
26
  /**
21
27
  * What this client may do at the pool's hosted domain.
22
28
  */
@@ -29,6 +35,7 @@ export class SimCognitoUserPoolClientSettings {
29
35
  this.explicitAuthFlows = new SimCognitoExplicitAuthFlows(properties.ExplicitAuthFlows);
30
36
  this.preventUserExistenceErrors = new SimCognitoPreventUserExistenceErrors(properties.PreventUserExistenceErrors);
31
37
  this.tokenValidity = new SimCognitoTokenValidity(properties);
38
+ this.refreshTokenRotation = new SimCognitoRefreshTokenRotation(properties.RefreshTokenRotation);
32
39
  this.oauth = new SimCognitoOAuthSettings(properties);
33
40
  }
34
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-user-pool-client-settings.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EACL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AAgBzC;;;;;;;;GAQG;AACH,MAAM,OAAO,gCAAgC;IAC3B,IAAI,CAAS;IACb,iBAAiB,CAA8B;IAC/C,0BAA0B,CAAuC;IACjE,aAAa,CAA0B;IAEvD;;OAEG;IACa,KAAK,CAA0B;IAE/C,YAAY,UAAsD;QAChE,IAAI,CAAC,IAAI,GAAG,IAAI,cAAc,CAAC;YAC7B,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU,CAAC,UAAU;SAC7B,CAAC,CAAC,KAAK,CAAC;QACT,IAAI,CAAC,iBAAiB,GAAG,IAAI,2BAA2B,CACtD,UAAU,CAAC,iBAAiB,CAC7B,CAAC;QACF,IAAI,CAAC,0BAA0B,GAAG,IAAI,oCAAoC,CACxE,UAAU,CAAC,0BAA0B,CACtC,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cognito-user-pool-client-settings.js","sourceRoot":"","sources":["../../../../../src/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EACL,8BAA8B,GAE/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AAmBzC;;;;;;;;GAQG;AACH,MAAM,OAAO,gCAAgC;IAC3B,IAAI,CAAS;IACb,iBAAiB,CAA8B;IAC/C,0BAA0B,CAAuC;IACjE,aAAa,CAA0B;IAEvD;;;OAGG;IACa,oBAAoB,CAAiC;IAErE;;OAEG;IACa,KAAK,CAA0B;IAE/C,YAAY,UAAsD;QAChE,IAAI,CAAC,IAAI,GAAG,IAAI,cAAc,CAAC;YAC7B,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU,CAAC,UAAU;SAC7B,CAAC,CAAC,KAAK,CAAC;QACT,IAAI,CAAC,iBAAiB,GAAG,IAAI,2BAA2B,CACtD,UAAU,CAAC,iBAAiB,CAC7B,CAAC;QACF,IAAI,CAAC,0BAA0B,GAAG,IAAI,oCAAoC,CACxE,UAAU,CAAC,0BAA0B,CACtC,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,oBAAoB,GAAG,IAAI,8BAA8B,CAC5D,UAAU,CAAC,oBAAoB,CAChC,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;CACF"}