@kensio/yulin 1.16.0 → 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.
- package/README.md +44 -46
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +2 -2
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +3 -2
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.d.ts +5 -2
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.d.ts.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js +38 -2
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.d.ts.map +1 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.js +5 -2
- package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts +10 -0
- package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts +14 -13
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js +14 -18
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.d.ts +15 -6
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.js +26 -19
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js +5 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts +41 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +72 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts +32 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts.map +1 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js +36 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js.map +1 -0
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
- package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
- package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
- package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
- package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
- package/dist/service/cognito/command/user/password-reset.command.js +2 -0
- package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts +22 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts.map +1 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.js +32 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.js.map +1 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +27 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +2 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +2 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-confirm-page.d.ts +29 -0
- package/dist/service/cognito/serve/page/sim-cognito-confirm-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-confirm-page.js +90 -0
- package/dist/service/cognito/serve/page/sim-cognito-confirm-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +41 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +77 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-form.d.ts +47 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-form.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-form.js +76 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-form.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts +69 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.js +111 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +57 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +82 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-request.d.ts +22 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-request.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-request.js +30 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-request.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +20 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +40 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.d.ts +35 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.js +85 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.js.map +1 -0
- package/dist/service/cognito/serve/sim-cognito-domain-endpoints.d.ts +20 -23
- package/dist/service/cognito/serve/sim-cognito-domain-endpoints.d.ts.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-domain-endpoints.js +40 -19
- package/dist/service/cognito/serve/sim-cognito-domain-endpoints.js.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-domain-request.d.ts +14 -0
- package/dist/service/cognito/serve/sim-cognito-domain-request.d.ts.map +1 -0
- package/dist/service/cognito/serve/sim-cognito-domain-request.js +2 -0
- package/dist/service/cognito/serve/sim-cognito-domain-request.js.map +1 -0
- package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
- package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
- package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
- package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.d.ts +8 -0
- package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.d.ts.map +1 -1
- package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.js +14 -6
- package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.js.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
- package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +9 -10
- package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
- package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.d.ts +28 -0
- package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.d.ts.map +1 -0
- package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.js +56 -0
- package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.js.map +1 -0
- package/dist/service/lambda/serve/response/sim-lambda-url-error-response.d.ts +16 -0
- package/dist/service/lambda/serve/response/sim-lambda-url-error-response.d.ts.map +1 -1
- package/dist/service/lambda/serve/response/sim-lambda-url-error-response.js +24 -0
- package/dist/service/lambda/serve/response/sim-lambda-url-error-response.js.map +1 -1
- package/dist/service/lambda/serve/sim-lambda-controller.d.ts +6 -0
- package/dist/service/lambda/serve/sim-lambda-controller.d.ts.map +1 -1
- package/dist/service/lambda/serve/sim-lambda-controller.js +11 -0
- package/dist/service/lambda/serve/sim-lambda-controller.js.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.js +2 -1
- package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts +4 -3
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts.map +1 -1
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js +4 -3
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js.map +1 -1
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.d.ts +2 -2
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.js +2 -2
- package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts +3 -0
- package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts.map +1 -1
- package/dist/service/sns/command/publish/sim-sns-publish-commands.js +4 -2
- package/dist/service/sns/command/publish/sim-sns-publish-commands.js.map +1 -1
- package/dist/service/sns/command/publish/sim-sns-publish-dispatch.d.ts +39 -0
- package/dist/service/sns/command/publish/sim-sns-publish-dispatch.d.ts.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-dispatch.js +42 -0
- package/dist/service/sns/command/publish/sim-sns-publish-dispatch.js.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts +3 -3
- package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts.map +1 -1
- package/dist/service/sns/command/publish/sim-sns-publish-input.js +8 -8
- package/dist/service/sns/command/publish/sim-sns-publish-input.js.map +1 -1
- package/dist/service/sns/command/publish/sim-sns-publish-sms.d.ts +38 -0
- package/dist/service/sns/command/publish/sim-sns-publish-sms.d.ts.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-sms.js +53 -0
- package/dist/service/sns/command/publish/sim-sns-publish-sms.js.map +1 -0
- package/dist/service/sns/command/sim-sns-command.types.d.ts +1 -0
- package/dist/service/sns/command/sim-sns-command.types.d.ts.map +1 -1
- package/dist/service/sns/command/sim-sns-commands.d.ts +12 -4
- package/dist/service/sns/command/sim-sns-commands.d.ts.map +1 -1
- package/dist/service/sns/command/sim-sns-commands.js +39 -4
- package/dist/service/sns/command/sim-sns-commands.js.map +1 -1
- package/dist/service/sns/command/sms/sim-sns-opt-out-commands.d.ts +41 -0
- package/dist/service/sns/command/sms/sim-sns-opt-out-commands.d.ts.map +1 -0
- package/dist/service/sns/command/sms/sim-sns-opt-out-commands.js +56 -0
- package/dist/service/sns/command/sms/sim-sns-opt-out-commands.js.map +1 -0
- package/dist/service/sns/command/sms/sms.command.d.ts +50 -0
- package/dist/service/sns/command/sms/sms.command.d.ts.map +1 -0
- package/dist/service/sns/command/sms/sms.command.js +2 -0
- package/dist/service/sns/command/sms/sms.command.js.map +1 -0
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts +5 -6
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts.map +1 -1
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js +8 -12
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js.map +1 -1
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts +6 -13
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts.map +1 -1
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js +13 -2
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js.map +1 -1
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts +10 -1
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts.map +1 -1
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.js.map +1 -1
- package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.d.ts +34 -0
- package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.d.ts.map +1 -0
- package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.js +46 -0
- package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.js.map +1 -0
- package/dist/service/sns/index.d.ts +5 -1
- package/dist/service/sns/index.d.ts.map +1 -1
- package/dist/service/sns/index.js +4 -1
- package/dist/service/sns/index.js.map +1 -1
- package/dist/service/sns/message/sim-sns-message-attribute-rules.d.ts.map +1 -1
- package/dist/service/sns/message/sim-sns-message-attribute-rules.js +9 -1
- package/dist/service/sns/message/sim-sns-message-attribute-rules.js.map +1 -1
- package/dist/service/sns/message/sim-sns-message-attributes.d.ts +8 -0
- package/dist/service/sns/message/sim-sns-message-attributes.d.ts.map +1 -1
- package/dist/service/sns/message/sim-sns-message-attributes.js +10 -0
- package/dist/service/sns/message/sim-sns-message-attributes.js.map +1 -1
- package/dist/service/sns/message/sim-sns-sms-attributes.d.ts +25 -0
- package/dist/service/sns/message/sim-sns-sms-attributes.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-sms-attributes.js +46 -0
- package/dist/service/sns/message/sim-sns-sms-attributes.js.map +1 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.d.ts.map +1 -1
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.js +12 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.js.map +1 -1
- package/dist/service/sns/sim-sns-sms.d.ts +63 -0
- package/dist/service/sns/sim-sns-sms.d.ts.map +1 -0
- package/dist/service/sns/sim-sns-sms.js +76 -0
- package/dist/service/sns/sim-sns-sms.js.map +1 -0
- package/dist/service/sns/sim-sns.d.ts +7 -15
- package/dist/service/sns/sim-sns.d.ts.map +1 -1
- package/dist/service/sns/sim-sns.js +23 -30
- package/dist/service/sns/sim-sns.js.map +1 -1
- package/dist/service/sns/sms/sim-sns-opt-out-list.d.ts +40 -0
- package/dist/service/sns/sms/sim-sns-opt-out-list.d.ts.map +1 -0
- package/dist/service/sns/sms/sim-sns-opt-out-list.js +47 -0
- package/dist/service/sns/sms/sim-sns-opt-out-list.js.map +1 -0
- package/dist/service/sns/sms/sim-sns-phone-number.d.ts +21 -0
- package/dist/service/sns/sms/sim-sns-phone-number.d.ts.map +1 -0
- package/dist/service/sns/sms/sim-sns-phone-number.js +41 -0
- package/dist/service/sns/sms/sim-sns-phone-number.js.map +1 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-message.d.ts +69 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-message.d.ts.map +1 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-message.js +71 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-message.js.map +1 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-store.d.ts +25 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-store.d.ts.map +1 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-store.js +28 -0
- package/dist/service/sns/sms/sim-sns-sent-sms-store.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts +9 -7
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts.map +1 -1
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js +7 -2
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js.map +1 -1
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts +19 -1
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts.map +1 -1
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.js +26 -5
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.js.map +1 -1
- package/package.json +2 -2
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { isSimCognitoManagedLoginRequired } from "../../error/sim-cognito-managed-login.error.js";
|
|
2
|
+
import { isSimCognitoOAuthError } from "../../error/sim-cognito-oauth.error.js";
|
|
3
|
+
import { SimCognitoConfirmPage } from "./sim-cognito-confirm-page.js";
|
|
4
|
+
import { SimCognitoForgotPasswordPage } from "./sim-cognito-forgot-password-page.js";
|
|
5
|
+
import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
|
|
6
|
+
import { simCognitoForgotPasswordPath, simCognitoIsLocalSignIn, simCognitoPagePaths, simCognitoResetPasswordPath, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
|
|
7
|
+
import { SimCognitoResetPasswordPage } from "./sim-cognito-reset-password-page.js";
|
|
8
|
+
import { SimCognitoPageRequest } from "./sim-cognito-page-request.js";
|
|
9
|
+
import { SimCognitoSignInPage } from "./sim-cognito-sign-in-page.js";
|
|
10
|
+
import { SimCognitoSignUpPage } from "./sim-cognito-sign-up-page.js";
|
|
11
|
+
/**
|
|
12
|
+
* The pages simulated managed login serves.
|
|
13
|
+
*
|
|
14
|
+
* A person reaches the sign-in form at the authorize endpoint, the sign-up
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
export class SimCognitoManagedLogin {
|
|
22
|
+
pageRequest = new SimCognitoPageRequest();
|
|
23
|
+
signInPage = new SimCognitoSignInPage();
|
|
24
|
+
signUpPage = new SimCognitoSignUpPage();
|
|
25
|
+
confirmPage = new SimCognitoConfirmPage();
|
|
26
|
+
forgotPasswordPage = new SimCognitoForgotPasswordPage();
|
|
27
|
+
resetPasswordPage = new SimCognitoResetPasswordPage();
|
|
28
|
+
/**
|
|
29
|
+
* Whether a path is one of the pages served beside the OAuth endpoints.
|
|
30
|
+
*/
|
|
31
|
+
static servesPage(pathname) {
|
|
32
|
+
return simCognitoPagePaths.has(pathname);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Answer the page a request reached.
|
|
36
|
+
*/
|
|
37
|
+
async handlePage(request) {
|
|
38
|
+
const form = this.formIn(request);
|
|
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
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Answer a refused authorize request on the sign-in form, where the form is
|
|
56
|
+
* what real managed login would have answered with.
|
|
57
|
+
*
|
|
58
|
+
* A request carrying no credentials gets the empty form. One the person
|
|
59
|
+
* filled in wrongly gets it back with the refusal on it, because a wrong
|
|
60
|
+
* password is theirs to correct rather than the application's to be told
|
|
61
|
+
* about. Every other refusal belongs to the application, and nothing here
|
|
62
|
+
* answers it.
|
|
63
|
+
*/
|
|
64
|
+
refusedSignIn(request, parameters, error) {
|
|
65
|
+
if (isSimCognitoManagedLoginRequired(error)) {
|
|
66
|
+
return this.signInPage.render(request.pool, parameters);
|
|
67
|
+
}
|
|
68
|
+
if (isSimCognitoOAuthError(error) || !simCognitoIsLocalSignIn(parameters)) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
return this.signInPage.render(request.pool, parameters, SimCognitoPageForm.messageIn(error));
|
|
72
|
+
}
|
|
73
|
+
formIn(request) {
|
|
74
|
+
return new SimCognitoPageForm(request, this.pageRequest.values(request.serviceRequest, request.url));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=sim-cognito-managed-login.js.map
|
|
@@ -0,0 +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,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,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;GASG;AACH,MAAM,OAAO,sBAAsB;IAChB,WAAW,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAC1C,UAAU,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACxC,UAAU,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACxC,WAAW,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAC1C,kBAAkB,GAAG,IAAI,4BAA4B,EAAE,CAAC;IACxD,iBAAiB,GAAG,IAAI,2BAA2B,EAAE,CAAC;IAEvE;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,QAAgB;QAChC,OAAO,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAAgC;QAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAElC,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC7B,KAAK,oBAAoB,EAAE,CAAC;gBAC1B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;YACD,KAAK,4BAA4B,EAAE,CAAC;gBAClC,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;YACD,KAAK,2BAA2B,EAAE,CAAC;gBACjC,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;YACD,SAAS,CAAC;gBACR,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,aAAa,CACX,OAAgC,EAChC,UAAoC,EACpC,KAAc;QAEd,IAAI,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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { SimCognitoUserPool } from "../../user-pool/sim-cognito-user-pool.js";
|
|
2
|
+
import type { SimCognitoDomainRequest } from "../sim-cognito-domain-request.js";
|
|
3
|
+
import type { SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
|
|
4
|
+
/**
|
|
5
|
+
* One request to a page, read as the form it fetched or posted.
|
|
6
|
+
*
|
|
7
|
+
* A page is reached with a query string and posted back with a form encoded
|
|
8
|
+
* body, and both are name and value pairs. Which of the two a value came from
|
|
9
|
+
* changes nothing about what the page does with it, so a form holds them the
|
|
10
|
+
* same way and holds the method beside them.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SimCognitoPageForm {
|
|
13
|
+
/** The authorize parameters this page carries on to the next one. */
|
|
14
|
+
readonly parameters: SimCognitoPageParameters;
|
|
15
|
+
private readonly request;
|
|
16
|
+
private readonly fields;
|
|
17
|
+
constructor(request: SimCognitoDomainRequest, values: SimCognitoPageParameters);
|
|
18
|
+
/**
|
|
19
|
+
* The message a refusal is shown on the page as.
|
|
20
|
+
*/
|
|
21
|
+
static messageIn(error: unknown): string;
|
|
22
|
+
/** The pool this page belongs to. */
|
|
23
|
+
get pool(): SimCognitoUserPool;
|
|
24
|
+
/** The simulated Cognito scope the operations behind the pages run in. */
|
|
25
|
+
get cognito(): SimCognitoDomainRequest["cognito"];
|
|
26
|
+
/** Whether the form was posted rather than fetched. */
|
|
27
|
+
get isPosted(): boolean;
|
|
28
|
+
/** The app client the grant this page belongs to was started by. */
|
|
29
|
+
get clientId(): string | undefined;
|
|
30
|
+
/** The user this page is about, which is empty until a form named one. */
|
|
31
|
+
get username(): string;
|
|
32
|
+
/**
|
|
33
|
+
* One field the form asked for.
|
|
34
|
+
*/
|
|
35
|
+
field(name: string): string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The `SecretHash` a client with a secret needs, and nothing for one
|
|
38
|
+
* without.
|
|
39
|
+
*
|
|
40
|
+
* Managed login computes this on the server rather than asking the browser
|
|
41
|
+
* for a secret, and so does this.
|
|
42
|
+
*/
|
|
43
|
+
secretHash(): {
|
|
44
|
+
SecretHash?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=sim-cognito-page-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-form.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAG7E;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAC7B,qEAAqE;IACrE,SAAgB,UAAU,EAAE,wBAAwB,CAAC;IAErD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAElD,YACE,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,wBAAwB,EAKjC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMvC;IAED,qCAAqC;IACrC,IAAI,IAAI,IAAI,kBAAkB,CAE7B;IAED,0EAA0E;IAC1E,IAAI,OAAO,IAAI,uBAAuB,CAAC,SAAS,CAAC,CAEhD;IAED,uDAAuD;IACvD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,oEAAoE;IACpE,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED,0EAA0E;IAC1E,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEtC;IAED;;;;;;OAMG;IACH,UAAU,IAAI;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAcpC;CACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { simCognitoSecretHash } from "../../user-pool/auth/sim-cognito-secret-hash.js";
|
|
2
|
+
import { simCognitoCarriedParameters } from "./sim-cognito-page-paths.js";
|
|
3
|
+
/**
|
|
4
|
+
* One request to a page, read as the form it fetched or posted.
|
|
5
|
+
*
|
|
6
|
+
* A page is reached with a query string and posted back with a form encoded
|
|
7
|
+
* body, and both are name and value pairs. Which of the two a value came from
|
|
8
|
+
* changes nothing about what the page does with it, so a form holds them the
|
|
9
|
+
* same way and holds the method beside them.
|
|
10
|
+
*/
|
|
11
|
+
export class SimCognitoPageForm {
|
|
12
|
+
/** The authorize parameters this page carries on to the next one. */
|
|
13
|
+
parameters;
|
|
14
|
+
request;
|
|
15
|
+
fields;
|
|
16
|
+
constructor(request, values) {
|
|
17
|
+
this.request = request;
|
|
18
|
+
this.fields = values;
|
|
19
|
+
this.parameters = simCognitoCarriedParameters(values);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The message a refusal is shown on the page as.
|
|
23
|
+
*/
|
|
24
|
+
static messageIn(error) {
|
|
25
|
+
if (error instanceof Error) {
|
|
26
|
+
return error.message;
|
|
27
|
+
}
|
|
28
|
+
return "The request was refused";
|
|
29
|
+
}
|
|
30
|
+
/** The pool this page belongs to. */
|
|
31
|
+
get pool() {
|
|
32
|
+
return this.request.pool;
|
|
33
|
+
}
|
|
34
|
+
/** The simulated Cognito scope the operations behind the pages run in. */
|
|
35
|
+
get cognito() {
|
|
36
|
+
return this.request.cognito;
|
|
37
|
+
}
|
|
38
|
+
/** Whether the form was posted rather than fetched. */
|
|
39
|
+
get isPosted() {
|
|
40
|
+
return this.request.serviceRequest.request.method === "POST";
|
|
41
|
+
}
|
|
42
|
+
/** The app client the grant this page belongs to was started by. */
|
|
43
|
+
get clientId() {
|
|
44
|
+
return this.parameters["client_id"];
|
|
45
|
+
}
|
|
46
|
+
/** The user this page is about, which is empty until a form named one. */
|
|
47
|
+
get username() {
|
|
48
|
+
return this.fields["username"] ?? "";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* One field the form asked for.
|
|
52
|
+
*/
|
|
53
|
+
field(name) {
|
|
54
|
+
return Object.entries(this.fields).find(([key]) => key === name)?.[1];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The `SecretHash` a client with a secret needs, and nothing for one
|
|
58
|
+
* without.
|
|
59
|
+
*
|
|
60
|
+
* Managed login computes this on the server rather than asking the browser
|
|
61
|
+
* for a secret, and so does this.
|
|
62
|
+
*/
|
|
63
|
+
secretHash() {
|
|
64
|
+
const { clientId, username } = this;
|
|
65
|
+
const secret = clientId === undefined
|
|
66
|
+
? undefined
|
|
67
|
+
: this.pool.findClient(clientId)?.secret;
|
|
68
|
+
// This asks whether the app client has a secret at all, and compares none.
|
|
69
|
+
// oxlint-disable-next-line security/detect-possible-timing-attacks
|
|
70
|
+
if (secret === undefined || clientId === undefined) {
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
return { SecretHash: simCognitoSecretHash(username, clientId, secret) };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=sim-cognito-page-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-form.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAIvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAkB;IAC7B,qEAAqE;IACrD,UAAU,CAA2B;IAEpC,OAAO,CAA0B;IACjC,MAAM,CAA2B;IAElD,YACE,OAAgC,EAChC,MAAgC;QAEhC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,KAAc;QAC7B,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,KAAK,CAAC,OAAO,CAAC;QACvB,CAAC;QAED,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,qCAAqC;IACrC,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,0EAA0E;IAC1E,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED,uDAAuD;IACvD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;IAC/D,CAAC;IAED,oEAAoE;IACpE,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED,0EAA0E;IAC1E,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAY;QAChB,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;OAMG;IACH,UAAU;QACR,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS;YACpB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAE7C,2EAA2E;QAC3E,mEAAmE;QACnE,IAAI,MAAM,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YACnD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,EAAE,UAAU,EAAE,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parameters a managed login page carries from one step to the next.
|
|
3
|
+
*
|
|
4
|
+
* They are the authorize request's own query string, held as hidden inputs so
|
|
5
|
+
* that the sign-in at the end of a sign-up reaches the app client's callback
|
|
6
|
+
* URL with the `state` the application started with.
|
|
7
|
+
*/
|
|
8
|
+
export type SimCognitoPageParameters = Readonly<Record<string, string>>;
|
|
9
|
+
/**
|
|
10
|
+
* The HTML the simulated managed login pages are built from.
|
|
11
|
+
*
|
|
12
|
+
* There is no styling and there is no script. The pages exist so that a
|
|
13
|
+
* browser in a local development server can complete a sign-up and a sign-in,
|
|
14
|
+
* and so that a test can post the same forms. Matching what real managed login
|
|
15
|
+
* looks like would be work no test could tell apart from this.
|
|
16
|
+
*
|
|
17
|
+
* Every value that reaches the page goes through `escaped`. A `state` is
|
|
18
|
+
* whatever the application put in it, and it is written back into a hidden
|
|
19
|
+
* input, so it is the one piece of this that a page could otherwise be broken
|
|
20
|
+
* with.
|
|
21
|
+
*/
|
|
22
|
+
export declare class SimCognitoPageMarkup {
|
|
23
|
+
/**
|
|
24
|
+
* One page, answered as HTML.
|
|
25
|
+
*/
|
|
26
|
+
page(title: string, body: string): Response;
|
|
27
|
+
/**
|
|
28
|
+
* Send the browser on to the next page of the flow.
|
|
29
|
+
*
|
|
30
|
+
* A form post is answered with a 303 so that the browser follows it with a
|
|
31
|
+
* GET, which is what stops a reload posting the form a second time.
|
|
32
|
+
*/
|
|
33
|
+
redirect(path: string, parameters: SimCognitoPageParameters): Response;
|
|
34
|
+
/**
|
|
35
|
+
* A form posting back to the path it was served from.
|
|
36
|
+
*/
|
|
37
|
+
form(action: string, body: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* One labelled input, with the label naming the field it is for.
|
|
40
|
+
*/
|
|
41
|
+
field(name: string, label: string, type?: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* The parameters this page carries on to the next one.
|
|
44
|
+
*/
|
|
45
|
+
hidden(parameters: SimCognitoPageParameters): string;
|
|
46
|
+
/**
|
|
47
|
+
* A link to another page of the flow, carrying the same parameters.
|
|
48
|
+
*/
|
|
49
|
+
link(path: string, parameters: SimCognitoPageParameters, text: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* What went wrong with the form that was just posted.
|
|
52
|
+
*/
|
|
53
|
+
message(text: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* A submit button, named so that a form with two of them says which was
|
|
56
|
+
* pressed.
|
|
57
|
+
*
|
|
58
|
+
* A button that asks the form to do something other than what its fields
|
|
59
|
+
* were filled in for skips the browser's own validation, so an empty
|
|
60
|
+
* required field does not stop it.
|
|
61
|
+
*/
|
|
62
|
+
submit(name: string, label: string, skipValidation?: boolean): string;
|
|
63
|
+
/**
|
|
64
|
+
* A value written into HTML, with the five characters that would otherwise
|
|
65
|
+
* change what the page means replaced.
|
|
66
|
+
*/
|
|
67
|
+
escaped(value: string): string;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=sim-cognito-page-markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-markup.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-markup.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAUxE;;;;;;;;;;;;GAYG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAc1C;IAED;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,wBAAwB,GAAG,QAAQ,CAOrE;IAED;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,SAAS,GAAG,MAAM,CAQxD;IAED;;OAEG;IACH,MAAM,CAAC,UAAU,EAAE,wBAAwB,GAAG,MAAM,CAQnD;IAED;;OAEG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,wBAAwB,EACpC,IAAI,EAAE,MAAM,GACX,MAAM,CAIR;IAED;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5B;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,UAAQ,GAAG,MAAM,CAMlE;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI7B;CACF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
const escapes = new Map([
|
|
2
|
+
["&", "&"],
|
|
3
|
+
["<", "<"],
|
|
4
|
+
[">", ">"],
|
|
5
|
+
['"', """],
|
|
6
|
+
["'", "'"],
|
|
7
|
+
]);
|
|
8
|
+
/**
|
|
9
|
+
* The HTML the simulated managed login pages are built from.
|
|
10
|
+
*
|
|
11
|
+
* There is no styling and there is no script. The pages exist so that a
|
|
12
|
+
* browser in a local development server can complete a sign-up and a sign-in,
|
|
13
|
+
* and so that a test can post the same forms. Matching what real managed login
|
|
14
|
+
* looks like would be work no test could tell apart from this.
|
|
15
|
+
*
|
|
16
|
+
* Every value that reaches the page goes through `escaped`. A `state` is
|
|
17
|
+
* whatever the application put in it, and it is written back into a hidden
|
|
18
|
+
* input, so it is the one piece of this that a page could otherwise be broken
|
|
19
|
+
* with.
|
|
20
|
+
*/
|
|
21
|
+
export class SimCognitoPageMarkup {
|
|
22
|
+
/**
|
|
23
|
+
* One page, answered as HTML.
|
|
24
|
+
*/
|
|
25
|
+
page(title, body) {
|
|
26
|
+
const html = `<!doctype html>\n<html lang="en">\n<head>\n` +
|
|
27
|
+
`<meta charset="utf-8">\n<title>${this.escaped(title)}</title>\n` +
|
|
28
|
+
`</head>\n<body>\n<h1>${this.escaped(title)}</h1>\n${body}\n` +
|
|
29
|
+
`</body>\n</html>\n`;
|
|
30
|
+
return new Response(html, {
|
|
31
|
+
status: 200,
|
|
32
|
+
headers: {
|
|
33
|
+
"content-type": "text/html; charset=utf-8",
|
|
34
|
+
"cache-control": "no-store",
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Send the browser on to the next page of the flow.
|
|
40
|
+
*
|
|
41
|
+
* A form post is answered with a 303 so that the browser follows it with a
|
|
42
|
+
* GET, which is what stops a reload posting the form a second time.
|
|
43
|
+
*/
|
|
44
|
+
redirect(path, parameters) {
|
|
45
|
+
const query = new URLSearchParams(parameters).toString();
|
|
46
|
+
return new Response(undefined, {
|
|
47
|
+
status: 303,
|
|
48
|
+
headers: { location: `${path}?${query}`, "cache-control": "no-store" },
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A form posting back to the path it was served from.
|
|
53
|
+
*/
|
|
54
|
+
form(action, body) {
|
|
55
|
+
return `<form method="post" action="${this.escaped(action)}">\n${body}</form>\n`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* One labelled input, with the label naming the field it is for.
|
|
59
|
+
*/
|
|
60
|
+
field(name, label, type = "text") {
|
|
61
|
+
const escapedName = this.escaped(name);
|
|
62
|
+
return (`<p><label for="${escapedName}">${this.escaped(label)}</label>\n` +
|
|
63
|
+
`<input id="${escapedName}" name="${escapedName}" ` +
|
|
64
|
+
`type="${this.escaped(type)}" required></p>\n`);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The parameters this page carries on to the next one.
|
|
68
|
+
*/
|
|
69
|
+
hidden(parameters) {
|
|
70
|
+
return Object.entries(parameters)
|
|
71
|
+
.map(([name, value]) => `<input type="hidden" name="${this.escaped(name)}" ` +
|
|
72
|
+
`value="${this.escaped(value)}">\n`)
|
|
73
|
+
.join("");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A link to another page of the flow, carrying the same parameters.
|
|
77
|
+
*/
|
|
78
|
+
link(path, parameters, text) {
|
|
79
|
+
const query = new URLSearchParams(parameters).toString();
|
|
80
|
+
return `<p><a href="${this.escaped(`${path}?${query}`)}">${this.escaped(text)}</a></p>\n`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* What went wrong with the form that was just posted.
|
|
84
|
+
*/
|
|
85
|
+
message(text) {
|
|
86
|
+
return `<p class="message">${this.escaped(text)}</p>\n`;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A submit button, named so that a form with two of them says which was
|
|
90
|
+
* pressed.
|
|
91
|
+
*
|
|
92
|
+
* A button that asks the form to do something other than what its fields
|
|
93
|
+
* were filled in for skips the browser's own validation, so an empty
|
|
94
|
+
* required field does not stop it.
|
|
95
|
+
*/
|
|
96
|
+
submit(name, label, skipValidation = false) {
|
|
97
|
+
return (`<p><button type="submit" name="${this.escaped(name)}" ` +
|
|
98
|
+
`value="${this.escaped(name)}"${skipValidation ? " formnovalidate" : ""}>` +
|
|
99
|
+
`${this.escaped(label)}</button></p>\n`);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A value written into HTML, with the five characters that would otherwise
|
|
103
|
+
* change what the page means replaced.
|
|
104
|
+
*/
|
|
105
|
+
escaped(value) {
|
|
106
|
+
return value.replaceAll(/[&<>"']/gu, (character) => {
|
|
107
|
+
return escapes.get(character) ?? character;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=sim-cognito-page-markup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-markup.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-markup.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
|
|
2
|
+
/**
|
|
3
|
+
* The path the sign-in form is served at and posts back to.
|
|
4
|
+
*
|
|
5
|
+
* Real managed login serves its form at `/login` and sends the browser there
|
|
6
|
+
* from `/oauth2/authorize`. Here the authorize endpoint answers with the form
|
|
7
|
+
* itself, so an application's own authorize URL is the whole of what a test
|
|
8
|
+
* has to know.
|
|
9
|
+
*/
|
|
10
|
+
export declare const simCognitoAuthorizePath = "/oauth2/authorize";
|
|
11
|
+
/**
|
|
12
|
+
* The path the sign-up form is served at.
|
|
13
|
+
*/
|
|
14
|
+
export declare const simCognitoSignUpPath = "/signup";
|
|
15
|
+
/**
|
|
16
|
+
* The path the confirmation form is served at.
|
|
17
|
+
*
|
|
18
|
+
* Real managed login confirms a sign-up on a page of `/signup` rather than at
|
|
19
|
+
* a path of its own. This one is separate so that a browser can come back to
|
|
20
|
+
* it with the code, and a test can reach it without replaying the sign-up.
|
|
21
|
+
*/
|
|
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>;
|
|
41
|
+
/**
|
|
42
|
+
* Whether a request signs in one of the pool's own users.
|
|
43
|
+
*
|
|
44
|
+
* A request naming no identity provider, or naming `COGNITO`, is the one
|
|
45
|
+
* managed login answers with its own form, so a refusal from it is shown on
|
|
46
|
+
* that form. One naming an external provider has no form to be shown on.
|
|
47
|
+
*/
|
|
48
|
+
export declare function simCognitoIsLocalSignIn(values: SimCognitoPageParameters): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The authorize parameters out of everything a request carried.
|
|
51
|
+
*
|
|
52
|
+
* A form post arrives holding these and the fields the form asked for, and a
|
|
53
|
+
* page passes on only these, so nothing a person typed becomes part of the
|
|
54
|
+
* next request's authorize parameters.
|
|
55
|
+
*/
|
|
56
|
+
export declare function simCognitoCarriedParameters(values: SimCognitoPageParameters): SimCognitoPageParameters;
|
|
57
|
+
//# sourceMappingURL=sim-cognito-page-paths.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The path the sign-in form is served at and posts back to.
|
|
3
|
+
*
|
|
4
|
+
* Real managed login serves its form at `/login` and sends the browser there
|
|
5
|
+
* from `/oauth2/authorize`. Here the authorize endpoint answers with the form
|
|
6
|
+
* itself, so an application's own authorize URL is the whole of what a test
|
|
7
|
+
* has to know.
|
|
8
|
+
*/
|
|
9
|
+
export const simCognitoAuthorizePath = "/oauth2/authorize";
|
|
10
|
+
/**
|
|
11
|
+
* The path the sign-up form is served at.
|
|
12
|
+
*/
|
|
13
|
+
export const simCognitoSignUpPath = "/signup";
|
|
14
|
+
/**
|
|
15
|
+
* The path the confirmation form is served at.
|
|
16
|
+
*
|
|
17
|
+
* Real managed login confirms a sign-up on a page of `/signup` rather than at
|
|
18
|
+
* a path of its own. This one is separate so that a browser can come back to
|
|
19
|
+
* it with the code, and a test can reach it without replaying the sign-up.
|
|
20
|
+
*/
|
|
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
|
+
]);
|
|
45
|
+
/**
|
|
46
|
+
* The authorize parameters every page carries on to the next.
|
|
47
|
+
*
|
|
48
|
+
* A sign-up ends in a sign-in, and that sign-in has to reach the app client's
|
|
49
|
+
* callback URL with the `state` the application started with, so these travel
|
|
50
|
+
* through each form as hidden inputs.
|
|
51
|
+
*/
|
|
52
|
+
const carriedNames = new Set([
|
|
53
|
+
"response_type",
|
|
54
|
+
"client_id",
|
|
55
|
+
"redirect_uri",
|
|
56
|
+
"state",
|
|
57
|
+
"scope",
|
|
58
|
+
"code_challenge",
|
|
59
|
+
"code_challenge_method",
|
|
60
|
+
]);
|
|
61
|
+
/**
|
|
62
|
+
* Whether a request signs in one of the pool's own users.
|
|
63
|
+
*
|
|
64
|
+
* A request naming no identity provider, or naming `COGNITO`, is the one
|
|
65
|
+
* managed login answers with its own form, so a refusal from it is shown on
|
|
66
|
+
* that form. One naming an external provider has no form to be shown on.
|
|
67
|
+
*/
|
|
68
|
+
export function simCognitoIsLocalSignIn(values) {
|
|
69
|
+
const named = values["identity_provider"] ?? values["idp_identifier"];
|
|
70
|
+
return named === undefined || named === "COGNITO";
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The authorize parameters out of everything a request carried.
|
|
74
|
+
*
|
|
75
|
+
* A form post arrives holding these and the fields the form asked for, and a
|
|
76
|
+
* page passes on only these, so nothing a person typed becomes part of the
|
|
77
|
+
* next request's authorize parameters.
|
|
78
|
+
*/
|
|
79
|
+
export function simCognitoCarriedParameters(values) {
|
|
80
|
+
return Object.fromEntries(Object.entries(values).filter(([name]) => carriedNames.has(name)));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=sim-cognito-page-paths.js.map
|
|
@@ -0,0 +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;;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,22 @@
|
|
|
1
|
+
import type { SimAwsServiceRequest } from "../../../../serve/controller/sim-service-controller.js";
|
|
2
|
+
import type { SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
|
|
3
|
+
/**
|
|
4
|
+
* What a request to a managed login page carried.
|
|
5
|
+
*
|
|
6
|
+
* A page is reached with a query string and posted back with a form encoded
|
|
7
|
+
* body, and both are name and value pairs, so they are read into the same
|
|
8
|
+
* record. Which of them a value came from changes nothing about what the page
|
|
9
|
+
* does with it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SimCognitoPageRequest {
|
|
12
|
+
/**
|
|
13
|
+
* The values a request carried, from its body where it has one and from its
|
|
14
|
+
* query string where it has not.
|
|
15
|
+
*/
|
|
16
|
+
values(serviceRequest: SimAwsServiceRequest, url: URL): SimCognitoPageParameters;
|
|
17
|
+
/**
|
|
18
|
+
* The body as it arrived, which the serving layer buffered.
|
|
19
|
+
*/
|
|
20
|
+
private body;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=sim-cognito-page-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-request.d.ts","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AACnG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAChC;;;OAGG;IACH,MAAM,CACJ,cAAc,EAAE,oBAAoB,EACpC,GAAG,EAAE,GAAG,GACP,wBAAwB,CAM1B;IAED;;OAEG;IACH,OAAO,CAAC,IAAI;CAOb"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a request to a managed login page carried.
|
|
3
|
+
*
|
|
4
|
+
* A page is reached with a query string and posted back with a form encoded
|
|
5
|
+
* body, and both are name and value pairs, so they are read into the same
|
|
6
|
+
* record. Which of them a value came from changes nothing about what the page
|
|
7
|
+
* does with it.
|
|
8
|
+
*/
|
|
9
|
+
export class SimCognitoPageRequest {
|
|
10
|
+
/**
|
|
11
|
+
* The values a request carried, from its body where it has one and from its
|
|
12
|
+
* query string where it has not.
|
|
13
|
+
*/
|
|
14
|
+
values(serviceRequest, url) {
|
|
15
|
+
if (serviceRequest.request.method === "GET") {
|
|
16
|
+
return Object.fromEntries(url.searchParams);
|
|
17
|
+
}
|
|
18
|
+
return Object.fromEntries(new URLSearchParams(this.body(serviceRequest)));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The body as it arrived, which the serving layer buffered.
|
|
22
|
+
*/
|
|
23
|
+
body(serviceRequest) {
|
|
24
|
+
if (serviceRequest.body === undefined) {
|
|
25
|
+
return "";
|
|
26
|
+
}
|
|
27
|
+
return Buffer.from(serviceRequest.body).toString("utf8");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=sim-cognito-page-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-page-request.js","sourceRoot":"","sources":["../../../../../src/service/cognito/serve/page/sim-cognito-page-request.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,OAAO,qBAAqB;IAChC;;;OAGG;IACH,MAAM,CACJ,cAAoC,EACpC,GAAQ;QAER,IAAI,cAAc,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACK,IAAI,CAAC,cAAoC;QAC/C,IAAI,cAAc,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -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"}
|