@kensio/yulin 1.16.1 → 1.16.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 (216) hide show
  1. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
  2. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
  3. package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
  4. package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
  5. package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
  6. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
  7. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
  8. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
  9. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
  10. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
  11. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
  12. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
  13. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -1
  14. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +2 -1
  15. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -1
  16. package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
  17. package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
  18. package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
  19. package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
  20. package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
  21. package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
  22. package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
  23. package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
  24. package/dist/service/cognito/command/user/password-reset.command.js +2 -0
  25. package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
  26. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
  27. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
  28. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
  29. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
  30. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
  31. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
  32. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
  33. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
  34. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
  35. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
  36. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
  37. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
  38. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
  39. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
  40. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
  41. package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
  42. package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
  43. package/dist/service/cognito/error/sim-cognito.error.js +27 -0
  44. package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
  45. package/dist/service/cognito/index.d.ts +2 -1
  46. package/dist/service/cognito/index.d.ts.map +1 -1
  47. package/dist/service/cognito/index.js +2 -1
  48. package/dist/service/cognito/index.js.map +1 -1
  49. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
  50. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
  51. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
  52. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
  53. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
  54. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
  55. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
  56. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
  57. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +9 -6
  58. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -1
  59. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +26 -11
  60. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -1
  61. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +18 -0
  62. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -1
  63. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +23 -0
  64. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -1
  65. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
  66. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
  67. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
  68. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
  69. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
  70. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
  71. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
  72. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
  73. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +2 -10
  74. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -1
  75. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +16 -21
  76. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -1
  77. package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
  78. package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
  79. package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
  80. package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
  81. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
  82. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
  83. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
  84. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
  85. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
  86. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
  87. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
  88. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
  89. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
  90. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
  91. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
  92. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
  93. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
  94. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
  95. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
  96. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
  97. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
  98. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
  99. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
  100. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
  101. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
  102. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
  103. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
  104. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
  105. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
  106. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
  107. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
  108. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
  109. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
  110. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
  111. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
  112. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
  113. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
  114. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
  115. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
  116. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
  117. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
  118. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
  119. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
  120. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
  121. package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
  122. package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
  123. package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
  124. package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
  125. package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
  126. package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
  127. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
  128. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  129. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  130. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
  131. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
  132. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
  133. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
  134. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
  135. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
  136. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
  137. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
  138. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
  139. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
  140. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
  141. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
  142. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
  143. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
  144. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
  145. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
  146. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
  147. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
  148. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
  149. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
  150. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
  151. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
  152. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
  153. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
  154. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
  155. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
  156. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
  157. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
  158. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
  159. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
  160. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
  161. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
  162. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
  163. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
  164. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
  165. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
  166. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
  167. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
  168. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
  169. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
  170. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
  171. package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
  172. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
  173. package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
  174. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
  175. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
  176. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
  177. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
  178. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
  179. package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
  180. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
  181. package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
  182. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
  183. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
  184. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
  185. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
  186. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
  187. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
  188. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
  189. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
  190. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
  191. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
  192. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
  193. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
  194. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
  195. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
  196. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
  197. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
  198. package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
  199. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  200. package/dist/service/lambda/function/sim-lambda-function.js +9 -10
  201. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  202. package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
  203. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  204. package/dist/service/lambda/sim-lambda-commands.js +2 -1
  205. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  206. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
  207. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
  208. package/package.json +2 -2
  209. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
  210. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
  211. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
  212. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
  213. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
  214. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
  215. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
  216. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
2
+ /**
3
+ * The form that starts a password reset, reached from a link on the sign-in
4
+ * page.
5
+ *
6
+ * It asks who has forgotten the password and posts that to `ForgotPassword`,
7
+ * which is what an application with its own sign-in screens calls. The browser
8
+ * goes on to the page that takes the code.
9
+ *
10
+ * What an unknown user sees is the app client's `PreventUserExistenceErrors`
11
+ * decision. A client that hides existence sends the browser to the next page
12
+ * either way, and one on the `LEGACY` default says the user is not there.
13
+ */
14
+ export declare class SimCognitoForgotPasswordPage {
15
+ private readonly markup;
16
+ /**
17
+ * The page, or the reset its form has just started.
18
+ */
19
+ handle(form: SimCognitoPageForm): Promise<Response>;
20
+ /**
21
+ * The page a browser is answered with, with a message where a reset has
22
+ * already been refused once.
23
+ */
24
+ private render;
25
+ }
26
+ //# sourceMappingURL=sim-cognito-forgot-password-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-forgot-password-page.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-forgot-password-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAQhE;;;;;;;;;;;GAWG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqBxD;IAED;;;OAGG;IACH,OAAO,CAAC,MAAM;CAmBf"}
@@ -0,0 +1,57 @@
1
+ import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
2
+ import { SimCognitoPageMarkup } from "./sim-cognito-page-markup.js";
3
+ import { simCognitoAuthorizePath, simCognitoForgotPasswordPath, simCognitoResetPasswordPath, } from "./sim-cognito-page-paths.js";
4
+ /**
5
+ * The form that starts a password reset, reached from a link on the sign-in
6
+ * page.
7
+ *
8
+ * It asks who has forgotten the password and posts that to `ForgotPassword`,
9
+ * which is what an application with its own sign-in screens calls. The browser
10
+ * goes on to the page that takes the code.
11
+ *
12
+ * What an unknown user sees is the app client's `PreventUserExistenceErrors`
13
+ * decision. A client that hides existence sends the browser to the next page
14
+ * either way, and one on the `LEGACY` default says the user is not there.
15
+ */
16
+ export class SimCognitoForgotPasswordPage {
17
+ markup = new SimCognitoPageMarkup();
18
+ /**
19
+ * The page, or the reset its form has just started.
20
+ */
21
+ async handle(form) {
22
+ if (!form.isPosted) {
23
+ return this.render(form);
24
+ }
25
+ try {
26
+ await form.cognito.forgotPassword({
27
+ input: {
28
+ ClientId: form.clientId,
29
+ Username: form.username,
30
+ ...form.secretHash(),
31
+ },
32
+ });
33
+ }
34
+ catch (error) {
35
+ return this.render(form, SimCognitoPageForm.messageIn(error));
36
+ }
37
+ return this.markup.redirect(simCognitoResetPasswordPath, {
38
+ ...form.parameters,
39
+ username: form.username,
40
+ });
41
+ }
42
+ /**
43
+ * The page a browser is answered with, with a message where a reset has
44
+ * already been refused once.
45
+ */
46
+ render(form, message) {
47
+ const { parameters } = form;
48
+ const body = (message === undefined ? "" : this.markup.message(message)) +
49
+ this.markup.form(simCognitoForgotPasswordPath, this.markup.hidden(parameters) +
50
+ this.markup.field("username", "Username") +
51
+ this.markup.submit("reset", "Send a reset code")) +
52
+ this.markup.link(simCognitoResetPasswordPath, parameters, "I already have a code") +
53
+ this.markup.link(simCognitoAuthorizePath, parameters, "Back to sign in");
54
+ return this.markup.page("Forgotten your password", body);
55
+ }
56
+ }
57
+ //# sourceMappingURL=sim-cognito-forgot-password-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-forgot-password-page.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-forgot-password-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;A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IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CACnD;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,2BAA2B,EAC3B,UAAU,EACV,uBAAuB,CACxB;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;CACF"}
@@ -4,22 +4,25 @@ import type { SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
4
4
  * The pages simulated managed login serves.
5
5
  *
6
6
  * A person reaches the sign-in form at the authorize endpoint, the sign-up
7
- * form from a link on it, and the confirmation form from the sign-up it has
8
- * just made. Each form carries the authorize request's own parameters through
9
- * as hidden inputs, so the sign-in at the end of it reaches the app client's
10
- * callback URL the application asked for.
7
+ * form and the forgotten password form from links on it, and the confirmation
8
+ * and new password forms from the step before each. Each form carries the
9
+ * authorize request's own parameters through as hidden inputs, so the sign-in
10
+ * at the end of it reaches the app client's callback URL the application asked
11
+ * for.
11
12
  */
12
13
  export declare class SimCognitoManagedLogin {
13
14
  private readonly pageRequest;
14
15
  private readonly signInPage;
15
16
  private readonly signUpPage;
16
17
  private readonly confirmPage;
18
+ private readonly forgotPasswordPage;
19
+ private readonly resetPasswordPage;
17
20
  /**
18
- * Whether a path is one of the two pages served beside the OAuth endpoints.
21
+ * Whether a path is one of the pages served beside the OAuth endpoints.
19
22
  */
20
23
  static servesPage(pathname: string): boolean;
21
24
  /**
22
- * Answer the sign-up or confirmation page a request reached.
25
+ * Answer the page a request reached.
23
26
  */
24
27
  handlePage(request: SimCognitoDomainRequest): Promise<Response>;
25
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-managed-login.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-managed-login.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAGhF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAU7E;;;;;;;;GAQG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAC3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAE3D;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI3C;IAED;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAQpE;IAED;;;;;;;;;OASG;IACH,aAAa,CACX,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAE,OAAO,GACb,QAAQ,GAAG,SAAS,CActB;IAED,OAAO,CAAC,MAAM;CAMf"}
1
+ {"version":3,"file":"sim-cognito-managed-login.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-managed-login.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAIhF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAa7E;;;;;;;;;GASG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAC3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAC3D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAsC;IACzE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqC;IAEvE;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3C;IAED;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiBpE;IAED;;;;;;;;;OASG;IACH,aAAa,CACX,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAE,OAAO,GACb,QAAQ,GAAG,SAAS,CActB;IAED,OAAO,CAAC,MAAM;CAMf"}
@@ -1,8 +1,10 @@
1
1
  import { isSimCognitoManagedLoginRequired } from "../../error/sim-cognito-managed-login.error.js";
2
2
  import { isSimCognitoOAuthError } from "../../error/sim-cognito-oauth.error.js";
3
3
  import { SimCognitoConfirmPage } from "./sim-cognito-confirm-page.js";
4
+ import { SimCognitoForgotPasswordPage } from "./sim-cognito-forgot-password-page.js";
4
5
  import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
5
- import { simCognitoConfirmPath, simCognitoIsLocalSignIn, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
6
+ import { simCognitoForgotPasswordPath, simCognitoIsLocalSignIn, simCognitoPagePaths, simCognitoResetPasswordPath, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
7
+ import { SimCognitoResetPasswordPage } from "./sim-cognito-reset-password-page.js";
6
8
  import { SimCognitoPageRequest } from "./sim-cognito-page-request.js";
7
9
  import { SimCognitoSignInPage } from "./sim-cognito-sign-in-page.js";
8
10
  import { SimCognitoSignUpPage } from "./sim-cognito-sign-up-page.js";
@@ -10,31 +12,44 @@ import { SimCognitoSignUpPage } from "./sim-cognito-sign-up-page.js";
10
12
  * The pages simulated managed login serves.
11
13
  *
12
14
  * A person reaches the sign-in form at the authorize endpoint, the sign-up
13
- * form from a link on it, and the confirmation form from the sign-up it has
14
- * just made. Each form carries the authorize request's own parameters through
15
- * as hidden inputs, so the sign-in at the end of it reaches the app client's
16
- * callback URL the application asked for.
15
+ * form and the forgotten password form from links on it, and the confirmation
16
+ * and new password forms from the step before each. Each form carries the
17
+ * authorize request's own parameters through as hidden inputs, so the sign-in
18
+ * at the end of it reaches the app client's callback URL the application asked
19
+ * for.
17
20
  */
18
21
  export class SimCognitoManagedLogin {
19
22
  pageRequest = new SimCognitoPageRequest();
20
23
  signInPage = new SimCognitoSignInPage();
21
24
  signUpPage = new SimCognitoSignUpPage();
22
25
  confirmPage = new SimCognitoConfirmPage();
26
+ forgotPasswordPage = new SimCognitoForgotPasswordPage();
27
+ resetPasswordPage = new SimCognitoResetPasswordPage();
23
28
  /**
24
- * Whether a path is one of the two pages served beside the OAuth endpoints.
29
+ * Whether a path is one of the pages served beside the OAuth endpoints.
25
30
  */
26
31
  static servesPage(pathname) {
27
- return (pathname === simCognitoSignUpPath || pathname === simCognitoConfirmPath);
32
+ return simCognitoPagePaths.has(pathname);
28
33
  }
29
34
  /**
30
- * Answer the sign-up or confirmation page a request reached.
35
+ * Answer the page a request reached.
31
36
  */
32
37
  async handlePage(request) {
33
38
  const form = this.formIn(request);
34
- if (request.url.pathname === simCognitoSignUpPath) {
35
- return await this.signUpPage.handle(form);
39
+ switch (request.url.pathname) {
40
+ case simCognitoSignUpPath: {
41
+ return await this.signUpPage.handle(form);
42
+ }
43
+ case simCognitoForgotPasswordPath: {
44
+ return await this.forgotPasswordPage.handle(form);
45
+ }
46
+ case simCognitoResetPasswordPath: {
47
+ return await this.resetPasswordPage.handle(form);
48
+ }
49
+ default: {
50
+ return await this.confirmPage.handle(form);
51
+ }
36
52
  }
37
- return await this.confirmPage.handle(form);
38
53
  }
39
54
  /**
40
55
  * Answer a refused authorize request on the sign-in form, where the form is
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-managed-login.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-managed-login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC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AgC,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1E,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAC3B,OAAO,CAAC,IAAI,EACZ,UAAU,EACV,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CACpC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,OAAgC;QAC7C,OAAO,IAAI,kBAAkB,CAC3B,OAAO,EACP,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cognito-managed-login.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-managed-login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B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AAI,gCAAgC,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1E,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAC3B,OAAO,CAAC,IAAI,EACZ,UAAU,EACV,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CACpC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,OAAgC;QAC7C,OAAO,IAAI,kBAAkB,CAC3B,OAAO,EACP,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF"}
@@ -20,6 +20,24 @@ export declare const simCognitoSignUpPath = "/signup";
20
20
  * it with the code, and a test can reach it without replaying the sign-up.
21
21
  */
22
22
  export declare const simCognitoConfirmPath = "/confirm";
23
+ /**
24
+ * The path the form asking who has forgotten a password is served at.
25
+ */
26
+ export declare const simCognitoForgotPasswordPath = "/forgotPassword";
27
+ /**
28
+ * The path the form taking the reset code and the new password is served at.
29
+ *
30
+ * Real managed login serves both halves of a reset at these two paths, and
31
+ * that is where an application's own links to them point.
32
+ */
33
+ export declare const simCognitoResetPasswordPath = "/confirmForgotPassword";
34
+ /**
35
+ * The pages served beside the OAuth endpoints.
36
+ *
37
+ * The sign-in form is not among them. It is what the authorize endpoint
38
+ * answers with, so it has no path of its own.
39
+ */
40
+ export declare const simCognitoPagePaths: ReadonlySet<string>;
23
41
  /**
24
42
  * Whether a request signs in one of the pool's own users.
25
43
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-page-paths.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAmBhD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,wBAAwB,GAC/B,wBAAwB,CAI1B"}
1
+ {"version":3,"file":"sim-cognito-page-paths.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAKlD,CAAC;AAmBH;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,wBAAwB,GAC/B,wBAAwB,CAI1B"}
@@ -19,6 +19,29 @@ export const simCognitoSignUpPath = "/signup";
19
19
  * it with the code, and a test can reach it without replaying the sign-up.
20
20
  */
21
21
  export const simCognitoConfirmPath = "/confirm";
22
+ /**
23
+ * The path the form asking who has forgotten a password is served at.
24
+ */
25
+ export const simCognitoForgotPasswordPath = "/forgotPassword";
26
+ /**
27
+ * The path the form taking the reset code and the new password is served at.
28
+ *
29
+ * Real managed login serves both halves of a reset at these two paths, and
30
+ * that is where an application's own links to them point.
31
+ */
32
+ export const simCognitoResetPasswordPath = "/confirmForgotPassword";
33
+ /**
34
+ * The pages served beside the OAuth endpoints.
35
+ *
36
+ * The sign-in form is not among them. It is what the authorize endpoint
37
+ * answers with, so it has no path of its own.
38
+ */
39
+ export const simCognitoPagePaths = new Set([
40
+ simCognitoSignUpPath,
41
+ simCognitoConfirmPath,
42
+ simCognitoForgotPasswordPath,
43
+ simCognitoResetPasswordPath,
44
+ ]);
22
45
  /**
23
46
  * The authorize parameters every page carries on to the next.
24
47
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-page-paths.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-paths.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,eAAe;IACf,WAAW;IACX,cAAc;IACd,OAAO;IACP,OAAO;IACP,gBAAgB;IAChB,uBAAuB;CACxB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAgC;IAEhC,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEtE,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAAgC;IAEhC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"sim-cognito-page-paths.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-paths.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC;IAC9D,oBAAoB;IACpB,qBAAqB;IACrB,4BAA4B;IAC5B,2BAA2B;CAC5B,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,eAAe;IACf,WAAW;IACX,cAAc;IACd,OAAO;IACP,OAAO;IACP,gBAAgB;IAChB,uBAAuB;CACxB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAgC;IAEhC,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEtE,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAAgC;IAEhC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { SimCognitoUserPool } from "../../user-pool/sim-cognito-user-pool.js";
2
+ import type { SimCognitoPageMarkup, SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
3
+ /**
4
+ * One link per identity provider this app client offers, each starting the
5
+ * federated sign-in the authorize endpoint already answers.
6
+ *
7
+ * A provider the client left out of its `SupportedIdentityProviders` is left
8
+ * off the page, because the authorize request the link would make is one that
9
+ * endpoint refuses.
10
+ */
11
+ export declare function simCognitoProviderLinks(markup: SimCognitoPageMarkup, pool: SimCognitoUserPool, parameters: SimCognitoPageParameters): string;
12
+ //# sourceMappingURL=sim-cognito-provider-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-provider-links.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-provider-links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,wBAAwB,GACnC,MAAM,CAiBR"}
@@ -0,0 +1,18 @@
1
+ import { simCognitoAuthorizePath } from "./sim-cognito-page-paths.js";
2
+ /**
3
+ * One link per identity provider this app client offers, each starting the
4
+ * federated sign-in the authorize endpoint already answers.
5
+ *
6
+ * A provider the client left out of its `SupportedIdentityProviders` is left
7
+ * off the page, because the authorize request the link would make is one that
8
+ * endpoint refuses.
9
+ */
10
+ export function simCognitoProviderLinks(markup, pool, parameters) {
11
+ const clientId = parameters["client_id"];
12
+ const client = clientId === undefined ? undefined : pool.findClient(clientId);
13
+ return pool.auth.identityProviders.all
14
+ .filter((provider) => client?.oauth.allowsIdentityProvider(provider.name) ?? false)
15
+ .map((provider) => markup.link(simCognitoAuthorizePath, { ...parameters, identity_provider: provider.name }, `Sign in with ${provider.name}`))
16
+ .join("");
17
+ }
18
+ //# sourceMappingURL=sim-cognito-provider-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-provider-links.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-provider-links.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAA4B,EAC5B,IAAwB,EACxB,UAAoC;IAEpC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE9E,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG;SACnC,MAAM,CACL,CAAC,QAAQ,EAAE,EAAE,CACX,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAC/D;SACA,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAChB,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,EAAE,GAAG,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC,IAAI,EAAE,EACnD,gBAAgB,QAAQ,CAAC,IAAI,EAAE,CAChC,CACF;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
2
+ /**
3
+ * The form that finishes a password reset, reached from the one that started
4
+ * it.
5
+ *
6
+ * It takes the code the pool issued and the password the person has chosen,
7
+ * and posts both to `ConfirmForgotPassword`. A wrong code and a password the
8
+ * pool's policy turns down are both shown on the form, which is where the
9
+ * person can do something about them.
10
+ *
11
+ * Nothing here delivers a code to anybody. The pool records the message it
12
+ * would have sent, and `SimCognitoUserPool.confirmationCode` is where a test
13
+ * reads it from, which is where a person would have read it out of an inbox.
14
+ */
15
+ export declare class SimCognitoResetPasswordPage {
16
+ private readonly markup;
17
+ /**
18
+ * The page, or the reset its form has just finished.
19
+ */
20
+ handle(form: SimCognitoPageForm): Promise<Response>;
21
+ /**
22
+ * The page a browser is answered with, with a message where a reset has
23
+ * already been refused once.
24
+ */
25
+ private render;
26
+ }
27
+ //# sourceMappingURL=sim-cognito-reset-password-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-reset-password-page.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-reset-password-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAOhE;;;;;;;;;;;;GAYG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAsBxD;IAED;;;OAGG;IACH,OAAO,CAAC,MAAM;CAwBf"}
@@ -0,0 +1,65 @@
1
+ import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
2
+ import { SimCognitoPageMarkup } from "./sim-cognito-page-markup.js";
3
+ import { simCognitoAuthorizePath, simCognitoResetPasswordPath, } from "./sim-cognito-page-paths.js";
4
+ /**
5
+ * The form that finishes a password reset, reached from the one that started
6
+ * it.
7
+ *
8
+ * It takes the code the pool issued and the password the person has chosen,
9
+ * and posts both to `ConfirmForgotPassword`. A wrong code and a password the
10
+ * pool's policy turns down are both shown on the form, which is where the
11
+ * person can do something about them.
12
+ *
13
+ * Nothing here delivers a code to anybody. The pool records the message it
14
+ * would have sent, and `SimCognitoUserPool.confirmationCode` is where a test
15
+ * reads it from, which is where a person would have read it out of an inbox.
16
+ */
17
+ export class SimCognitoResetPasswordPage {
18
+ markup = new SimCognitoPageMarkup();
19
+ /**
20
+ * The page, or the reset its form has just finished.
21
+ */
22
+ async handle(form) {
23
+ if (!form.isPosted) {
24
+ return this.render(form);
25
+ }
26
+ try {
27
+ await form.cognito.confirmForgotPassword({
28
+ input: {
29
+ ClientId: form.clientId,
30
+ Username: form.username,
31
+ ConfirmationCode: form.field("code"),
32
+ Password: form.field("password"),
33
+ ...form.secretHash(),
34
+ },
35
+ });
36
+ }
37
+ catch (error) {
38
+ return this.render(form, SimCognitoPageForm.messageIn(error));
39
+ }
40
+ // The user signs in with its new password at the endpoint the browser
41
+ // arrived on, which is where the grant it started carries on from.
42
+ return this.markup.redirect(simCognitoAuthorizePath, form.parameters);
43
+ }
44
+ /**
45
+ * The page a browser is answered with, with a message where a reset has
46
+ * already been refused once.
47
+ */
48
+ render(form, message) {
49
+ const { parameters, username } = form;
50
+ // The page that started the reset names the user, and a browser that came
51
+ // here from a link instead has to say who it is.
52
+ const user = username === ""
53
+ ? this.markup.field("username", "Username")
54
+ : this.markup.hidden({ username });
55
+ const body = (message === undefined ? "" : this.markup.message(message)) +
56
+ this.markup.form(simCognitoResetPasswordPath, this.markup.hidden(parameters) +
57
+ user +
58
+ this.markup.field("code", "Reset code") +
59
+ this.markup.field("password", "New password", "password") +
60
+ this.markup.submit("reset", "Set the new password")) +
61
+ this.markup.link(simCognitoAuthorizePath, parameters, "Back to sign in");
62
+ return this.markup.page("Choose a new password", body);
63
+ }
64
+ }
65
+ //# sourceMappingURL=sim-cognito-reset-password-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cognito-reset-password-page.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-reset-password-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,2BAA2B;IACrB,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAErD;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAAwB;QACnC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC;gBACvC,KAAK,EAAE;oBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;oBACpC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;oBAChC,GAAG,IAAI,CAAC,UAAU,EAAE;iBACrB;aACF,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,sEAAsE;QACtE,mEAAmE;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,IAAwB,EAAE,OAAgB;QACvD,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAEtC,0EAA0E;QAC1E,iDAAiD;QACjD,MAAM,IAAI,GACR,QAAQ,KAAK,EAAE;YACb,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC;YAC3C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEvC,MAAM,IAAI,GACR,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,2BAA2B,EAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC5B,IAAI;gBACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC;gBACvC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,CAAC;gBACzD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,CACtD;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -6,7 +6,8 @@ import { type SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
6
6
  * The form posts back to the authorize endpoint, carrying the parameters the
7
7
  * browser arrived on as hidden inputs and the two fields the person filled in.
8
8
  * The pool's identity providers are links to the same endpoint with
9
- * `identity_provider` set, so both ways in are reachable from this one page.
9
+ * `identity_provider` set, so both ways in are reachable from this one page,
10
+ * and the other pages of the journey are links beside them.
10
11
  */
11
12
  export declare class SimCognitoSignInPage {
12
13
  private readonly markup;
@@ -15,14 +16,5 @@ export declare class SimCognitoSignInPage {
15
16
  * already been refused once.
16
17
  */
17
18
  render(pool: SimCognitoUserPool, parameters: SimCognitoPageParameters, message?: string): Response;
18
- /**
19
- * One link per identity provider this app client offers, each starting the
20
- * federated sign-in the same endpoint already answers.
21
- *
22
- * A provider the client left out of its `SupportedIdentityProviders` is left
23
- * off the page, because the authorize request the link would make is one
24
- * that endpoint refuses.
25
- */
26
- private providerLinks;
27
19
  }
28
20
  //# sourceMappingURL=sim-cognito-sign-in-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-sign-in-page.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-sign-in-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AAOtC;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,wBAAwB,EACpC,OAAO,CAAC,EAAE,MAAM,GACf,QAAQ,CAeV;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;CAsBtB"}
1
+ {"version":3,"file":"sim-cognito-sign-in-page.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-sign-in-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AAkBtC;;;;;;;;GAQG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,wBAAwB,EACpC,OAAO,CAAC,EAAE,MAAM,GACf,QAAQ,CAgBV;CACF"}
@@ -1,12 +1,22 @@
1
1
  import { SimCognitoPageMarkup, } from "./sim-cognito-page-markup.js";
2
- import { simCognitoAuthorizePath, simCognitoConfirmPath, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
2
+ import { simCognitoAuthorizePath, simCognitoConfirmPath, simCognitoForgotPasswordPath, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
3
+ import { simCognitoProviderLinks } from "./sim-cognito-provider-links.js";
4
+ /**
5
+ * The other pages the sign-in form links to, in the order they are offered.
6
+ */
7
+ const linkedPages = [
8
+ [simCognitoSignUpPath, "Sign up"],
9
+ [simCognitoConfirmPath, "Confirm a sign-up"],
10
+ [simCognitoForgotPasswordPath, "Forgotten your password?"],
11
+ ];
3
12
  /**
4
13
  * The sign-in form managed login answers an authorize request with.
5
14
  *
6
15
  * The form posts back to the authorize endpoint, carrying the parameters the
7
16
  * browser arrived on as hidden inputs and the two fields the person filled in.
8
17
  * The pool's identity providers are links to the same endpoint with
9
- * `identity_provider` set, so both ways in are reachable from this one page.
18
+ * `identity_provider` set, so both ways in are reachable from this one page,
19
+ * and the other pages of the journey are links beside them.
10
20
  */
11
21
  export class SimCognitoSignInPage {
12
22
  markup = new SimCognitoPageMarkup();
@@ -20,26 +30,11 @@ export class SimCognitoSignInPage {
20
30
  this.markup.field("username", "Username") +
21
31
  this.markup.field("password", "Password", "password") +
22
32
  this.markup.submit("signIn", "Sign in")) +
23
- this.providerLinks(pool, parameters) +
24
- this.markup.link(simCognitoSignUpPath, parameters, "Sign up") +
25
- this.markup.link(simCognitoConfirmPath, parameters, "Confirm a sign-up");
33
+ simCognitoProviderLinks(this.markup, pool, parameters) +
34
+ linkedPages
35
+ .map(([path, text]) => this.markup.link(path, parameters, text))
36
+ .join("");
26
37
  return this.markup.page("Sign in", body);
27
38
  }
28
- /**
29
- * One link per identity provider this app client offers, each starting the
30
- * federated sign-in the same endpoint already answers.
31
- *
32
- * A provider the client left out of its `SupportedIdentityProviders` is left
33
- * off the page, because the authorize request the link would make is one
34
- * that endpoint refuses.
35
- */
36
- providerLinks(pool, parameters) {
37
- const clientId = parameters["client_id"];
38
- const client = clientId === undefined ? undefined : pool.findClient(clientId);
39
- return pool.auth.identityProviders.all
40
- .filter((provider) => client?.oauth.allowsIdentityProvider(provider.name) ?? false)
41
- .map((provider) => this.markup.link(simCognitoAuthorizePath, { ...parameters, identity_provider: provider.name }, `Sign in with ${provider.name}`))
42
- .join("");
43
- }
44
39
  }
45
40
  //# sourceMappingURL=sim-cognito-sign-in-page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-sign-in-page.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-sign-in-page.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IACd,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAErD;;;OAGG;IACH,MAAM,CACJ,IAAwB,EACxB,UAAoC,EACpC,OAAgB;QAEhB,MAAM,IAAI,GACR,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,uBAAuB,EACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;gBACrD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAC1C;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,UAAU,EAAE,SAAS,CAAC;YAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,UAAU,EAAE,mBAAmB,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;OAOG;IACK,aAAa,CACnB,IAAwB,EACxB,UAAoC;QAEpC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;QACzC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAEjE,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG;aACnC,MAAM,CACL,CAAC,QAAQ,EAAE,EAAE,CACX,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAC/D;aACA,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,uBAAuB,EACvB,EAAE,GAAG,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC,IAAI,EAAE,EACnD,gBAAgB,QAAQ,CAAC,IAAI,EAAE,CAChC,CACF;aACA,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cognito-sign-in-page.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-sign-in-page.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,G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CAAC,CAAC;QAEd,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -40,6 +40,22 @@ export declare abstract class SimCognitoUserDirectory extends SimCognitoUserFact
40
40
  * Handle an AdminConfirmSignUp Command from the SDK.
41
41
  */
42
42
  adminConfirmSignUp(command: simCognitoCommands.SimAdminConfirmSignUpCommand, options?: SimCognitoIdentityProviderRequestOptions): Promise<simCognitoCommands.SimAdminConfirmSignUpCommandOutput>;
43
+ /**
44
+ * Handle a ForgotPassword Command from the SDK.
45
+ *
46
+ * No caller is read, because real Cognito authorizes this operation with no
47
+ * IAM policy at all: it is what an application calls for someone who cannot
48
+ * sign in and holds no AWS credentials.
49
+ */
50
+ forgotPassword(command: simCognitoCommands.SimForgotPasswordCommand): Promise<simCognitoCommands.SimForgotPasswordCommandOutput>;
51
+ /**
52
+ * Handle a ConfirmForgotPassword Command from the SDK.
53
+ */
54
+ confirmForgotPassword(command: simCognitoCommands.SimConfirmForgotPasswordCommand): Promise<simCognitoCommands.SimConfirmForgotPasswordCommandOutput>;
55
+ /**
56
+ * Handle an AdminResetUserPassword Command from the SDK.
57
+ */
58
+ adminResetUserPassword(command: simCognitoCommands.SimAdminResetUserPasswordCommand, options?: SimCognitoIdentityProviderRequestOptions): Promise<simCognitoCommands.SimAdminResetUserPasswordCommandOutput>;
43
59
  /**
44
60
  * Handle an AdminGetUser Command from the SDK.
45
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cognito-user-directory.d.ts","sourceRoot":"","sources":["../../../src/service/cognito/sim-cognito-user-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,KAAK,kBAAkB,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EACL,qBAAqB,E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C,kBAAkB,CAAC,2BAA2B,CAAC,CAGzD;IAED;;OAEG;IACG,WAAW,CACf,OAAO,EAAE,kBAAkB,CAAC,qBAAqB,EACjD,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,CAGzD;IAED;;OAEG;IACG,UAAU,CACd,OAAO,EAAE,kBAAkB,CAAC,oBAAoB,EAChD,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAGxD;IAED;;OAEG;IACG,mBAAmB,CACvB,OAAO,EAAE,kBAAkB,CAAC,6BAA6B,EACzD,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,mCAAmC,CAAC,CAGjE;IAED;;OAEG;IACG,wBAAwB,CAC5B,OAAO,EAAE,kBAAkB,CAAC,kCAAkC,EAC9D,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,CAGtE;IAED;;OAEG;IACG,sBAAsB,CAC1B,OAAO,EAAE,kBAAkB,CAAC,gCAAgC,EAC5D,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,sCAAsC,CAAC,CAGpE;IAED;;OAEG;IACG,gBAAgB,CACpB,OAAO,EAAE,kBAAkB,CAAC,0BAA0B,EACtD,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,gCAAgC,CAAC,CAG9D;CACF"}
1
+ {"version":3,"file":"sim-cognito-user-directory.d.ts","sourceRoot":"","sources":["../../../src/service/cognito/sim-cognito-user-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,KAAK,kBAAkB,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;A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OAEG;IACG,gBAAgB,CACpB,OAAO,EAAE,kBAAkB,CAAC,0BAA0B,EACtD,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,kBAAkB,CAAC,gCAAgC,CAAC,CAG9D;CACF"}
@@ -49,6 +49,31 @@ export class SimCognitoUserDirectory extends SimCognitoUserFactors {
49
49
  await this.background.sequence();
50
50
  return this.commands.signUp.adminConfirmSignUp(command, options);
51
51
  }
52
+ /**
53
+ * Handle a ForgotPassword Command from the SDK.
54
+ *
55
+ * No caller is read, because real Cognito authorizes this operation with no
56
+ * IAM policy at all: it is what an application calls for someone who cannot
57
+ * sign in and holds no AWS credentials.
58
+ */
59
+ async forgotPassword(command) {
60
+ await this.background.sequence();
61
+ return this.commands.passwordReset.forgotPassword(command);
62
+ }
63
+ /**
64
+ * Handle a ConfirmForgotPassword Command from the SDK.
65
+ */
66
+ async confirmForgotPassword(command) {
67
+ await this.background.sequence();
68
+ return this.commands.passwordReset.confirmForgotPassword(command);
69
+ }
70
+ /**
71
+ * Handle an AdminResetUserPassword Command from the SDK.
72
+ */
73
+ async adminResetUserPassword(command, options) {
74
+ await this.background.sequence();
75
+ return this.commands.passwordReset.adminResetUserPassword(command, options);
76
+ }
52
77
  /**
53
78
  * Handle an AdminGetUser Command from the SDK.
54
79
  */