ekyc

Electronic KYC process with uploading ID document using OAuth 2.1 (experimental)
Log | Files | Refs | README | LICENSE

ModeNameSize
-rw-r--r--LICENSE190L
-rw-r--r--README.md25L
-rw-r--r--admins.json3L
-rw-r--r--clients.json9L
-rw-r--r--deno.jsonc32L
-rw-r--r--deno.lock784L
-rw-r--r--docs/.gitignore3L
-rw-r--r--docs/build/defense.pdf14061629B
-rw-r--r--docs/build/thesis.pdf10715883B
-rw-r--r--docs/contents/1.introduction.tex157L
-rw-r--r--docs/contents/2.architecture.tex64L
-rw-r--r--docs/contents/3.security.tex102L
-rw-r--r--docs/contents/4.design.tex72L
-rw-r--r--docs/contents/5.testing.tex68L
-rw-r--r--docs/contents/6.results.tex15L
-rw-r--r--docs/contents/7.conclusion.tex17L
-rw-r--r--docs/contents/_abstract.tex17L
-rw-r--r--docs/contents/_acknowledgement.tex17L
-rw-r--r--docs/contents/_glossary.tex60L
-rw-r--r--docs/contents/appendix-user-manual.tex156L
-rw-r--r--docs/defense.ltx324L
-rw-r--r--docs/figures/DiamondTesting.png63917B
-rw-r--r--docs/figures/authorize-process.pdf20677B
-rw-r--r--docs/figures/connection-process.pdf23771B
-rw-r--r--docs/figures/design.drawio67L
-rw-r--r--docs/figures/ekyc-process.pdf25068B
-rw-r--r--docs/figures/ekyc.png2803561B
-rw-r--r--docs/figures/face-challenge.png4549680B
-rw-r--r--docs/figures/id-doc-ekyc-doc-back.png354659B
-rw-r--r--docs/figures/id-doc-ekyc-doc-front.png419240B
-rw-r--r--docs/figures/id-doc-ekyc-face-front.png411131B
-rw-r--r--docs/figures/id-doc-ekyc-face-left.png410072B
-rw-r--r--docs/figures/id-doc-ekyc-face-right.png402269B
-rw-r--r--docs/figures/kyc-exemple-alcohol.png2512603B
-rw-r--r--docs/figures/kyc-exemple-aviation.png2374569B
-rw-r--r--docs/figures/kyc-exemple-casino.png2326743B
-rw-r--r--docs/figures/mrz.png322092B
-rw-r--r--docs/figures/oauth2-example.pdf65464B
-rw-r--r--docs/figures/oauth2-flow.pdf105189B
-rw-r--r--docs/figures/old/DepositWithKYC.bpmn2047L
-rw-r--r--docs/figures/old/DomainModel.mocodo.net20L
-rw-r--r--docs/figures/old/DomainModel.svg260L
-rw-r--r--docs/figures/old/context-map.drawio.svg4L
-rw-r--r--docs/figures/old/context-map.png36088B
-rw-r--r--docs/figures/old/detail-context-map.png151629B
-rw-r--r--docs/figures/old/general-taler-working.png35898B
-rw-r--r--docs/figures/old/seq.mermaid32L
-rw-r--r--docs/figures/old/toplevel-architecture.png118918B
-rw-r--r--docs/figures/old/wallpaper.png1495547B
-rw-r--r--docs/figures/phone-ekyc-process.pdf11074B
-rw-r--r--docs/figures/phone-ekyc-step-1.png29934B
-rw-r--r--docs/figures/phone-ekyc-step-2.png37937B
-rw-r--r--docs/figures/phone-ekyc-step-3.png37388B
-rw-r--r--docs/figures/phone-ekyc-steps.png254895B
-rw-r--r--docs/figures/phone-ekyc.pdf388563B
-rw-r--r--docs/figures/project-arch.drawio886L
-rw-r--r--docs/figures/sigdoydy1.jpeg15732B
-rw-r--r--docs/figures/software-layer.pdf98306B
-rw-r--r--docs/figures/strategical-vs-tactical.pdf29321B
-rw-r--r--docs/figures/system.pdf423292B
-rw-r--r--docs/figures/tdd-cycle.pdf10018B
-rw-r--r--docs/figures/toplevel-sequence.pdf376239B
-rw-r--r--docs/figures/toplevel.pdf359357B
-rw-r--r--docs/figures/wallpaper.png1262007B
-rw-r--r--docs/references.bib87L
-rw-r--r--docs/thesis.ltx170L
-rw-r--r--flake.lock26L
-rw-r--r--flake.nix72L
-rw-r--r--media/book.pdf310470B
-rw-r--r--media/demo.php92L
-rw-r--r--media/poster.pdf1117388B
-rw-r--r--media/poster.pptx5384807B
-rw-r--r--media/presentation.pptx8626228B
-rw-r--r--media/video.mp487134631B
-rw-r--r--media/video.pptx7640412B
-rw-r--r--nessie.config.ts16L
-rw-r--r--planning.xlsx15541B
-rw-r--r--src/core/application/authn/auth_repository.ts11L
-rw-r--r--src/core/application/authn/email_challenge.ts56L
-rw-r--r--src/core/application/authn/exists.ts44L
-rw-r--r--src/core/application/authn/login.ts45L
-rw-r--r--src/core/application/authn/logout.ts29L
-rw-r--r--src/core/application/authn/register.ts51L
-rw-r--r--src/core/application/authn/session.ts44L
-rw-r--r--src/core/application/authn/verify_email.ts47L
-rw-r--r--src/core/application/customer_info.ts26L
-rw-r--r--src/core/application/id_document/admin_repository.ts6L
-rw-r--r--src/core/application/id_document/approve.ts45L
-rw-r--r--src/core/application/id_document/capture.ts74L
-rw-r--r--src/core/application/id_document/decline.ts42L
-rw-r--r--src/core/application/id_document/id_document_repository.ts7L
-rw-r--r--src/core/application/id_document/is_admin.ts20L
-rw-r--r--src/core/application/id_document/list.ts21L
-rw-r--r--src/core/application/id_document/mrzscan.ts12L
-rw-r--r--src/core/application/oauth2/authorize.ts51L
-rw-r--r--src/core/application/oauth2/client_repository.ts6L
-rw-r--r--src/core/application/oauth2/flow_repository.ts9L
-rw-r--r--src/core/application/oauth2/initiate.ts60L
-rw-r--r--src/core/application/oauth2/ratelimit_repository.ts6L
-rw-r--r--src/core/application/oauth2/token.ts70L
-rw-r--r--src/core/application/oauth2/user_info.ts95L
-rw-r--r--src/core/application/oauth2/validate.ts44L
-rw-r--r--src/core/application/phone/phone_repository.ts7L
-rw-r--r--src/core/application/phone/register.ts65L
-rw-r--r--src/core/application/phone/verify_sms.ts50L
-rw-r--r--src/core/application/repository_error.ts17L
-rw-r--r--src/core/composer.ts31L
-rw-r--r--src/core/domain/admin.ts6L
-rw-r--r--src/core/domain/auth.ts68L
-rw-r--r--src/core/domain/client.ts51L
-rw-r--r--src/core/domain/code.ts20L
-rw-r--r--src/core/domain/code_challenge.ts94L
-rw-r--r--src/core/domain/constants.ts54L
-rw-r--r--src/core/domain/crypto.ts179L
-rw-r--r--src/core/domain/email.ts20L
-rw-r--r--src/core/domain/email_challenge.ts56L
-rw-r--r--src/core/domain/ephemeral.ts33L
-rw-r--r--src/core/domain/error.ts5L
-rw-r--r--src/core/domain/id_document.ts134L
-rw-r--r--src/core/domain/id_info.ts11L
-rw-r--r--src/core/domain/limiter.ts49L
-rw-r--r--src/core/domain/logger.ts22L
-rw-r--r--src/core/domain/oauth2flow.ts83L
-rw-r--r--src/core/domain/password.ts53L
-rw-r--r--src/core/domain/personal_phone_number.ts40L
-rw-r--r--src/core/domain/phone_ekyc.ts30L
-rw-r--r--src/core/domain/picture.ts22L
-rw-r--r--src/core/domain/rate_limit.ts15L
-rw-r--r--src/core/domain/scope.ts34L
-rw-r--r--src/core/domain/session_token.ts31L
-rw-r--r--src/core/domain/sms_challenge.ts41L
-rw-r--r--src/core/domain/tests/code_challenge.test.ts101L
-rw-r--r--src/core/domain/tests/crypto.test.ts90L
-rw-r--r--src/core/domain/tests/email.test.ts44L
-rw-r--r--src/core/domain/tests/ephemeral.test.ts62L
-rw-r--r--src/core/domain/tests/limiter.test.ts58L
-rw-r--r--src/core/domain/tests/personal_phone_number.test.ts38L
-rw-r--r--src/core/domain/token.ts20L
-rw-r--r--src/core/domain/uuid.ts20L
-rw-r--r--src/core/factory.ts103L
-rw-r--r--src/http/.gitignore11L
-rw-r--r--src/http/README.md16L
-rw-r--r--src/http/app.ts19L
-rw-r--r--src/http/ca-cert.dev.pem22L
-rw-r--r--src/http/ca-key.dev.pem27L
-rwxr-xr-xsrc/http/dev.ts7L
-rw-r--r--src/http/form.ts128L
-rw-r--r--src/http/fresh.config.ts22L
-rw-r--r--src/http/fresh.gen.ts70L
-rw-r--r--src/http/islands/code_input.tsx30L
-rw-r--r--src/http/islands/delayed_button.tsx39L
-rw-r--r--src/http/islands/email_input.tsx29L
-rw-r--r--src/http/islands/password_input.tsx70L
-rw-r--r--src/http/islands/phone_number_input.tsx35L
-rw-r--r--src/http/islands/photo_capture_input.tsx116L
-rw-r--r--src/http/main.ts11L
-rw-r--r--src/http/routes/(admin)/verify/id-document.tsx171L
-rw-r--r--src/http/routes/(customer)/_layout.tsx9L
-rw-r--r--src/http/routes/(customer)/connect.tsx83L
-rw-r--r--src/http/routes/(customer)/login.tsx75L
-rw-r--r--src/http/routes/(customer)/logout.tsx17L
-rw-r--r--src/http/routes/(customer)/register/email.tsx69L
-rw-r--r--src/http/routes/(customer)/register/id-document.tsx234L
-rw-r--r--src/http/routes/(customer)/register/phone.tsx83L
-rw-r--r--src/http/routes/(customer)/verify/email.tsx76L
-rw-r--r--src/http/routes/(customer)/verify/id-document.tsx80L
-rw-r--r--src/http/routes/(customer)/verify/sms.tsx134L
-rw-r--r--src/http/routes/_404.tsx18L
-rw-r--r--src/http/routes/_500.tsx23L
-rw-r--r--src/http/routes/_app.tsx16L
-rw-r--r--src/http/routes/_layout.tsx65L
-rw-r--r--src/http/routes/_middleware.ts24L
-rw-r--r--src/http/routes/index.tsx31L
-rw-r--r--src/http/routes/oauth2/authorize.tsx103L
-rw-r--r--src/http/routes/oauth2/callback.tsx31L
-rw-r--r--src/http/routes/oauth2/token.tsx36L
-rw-r--r--src/http/routes/oauth2/userinfo.tsx21L
-rw-r--r--src/http/static/favicon.ico22382B
-rw-r--r--src/http/static/logo.svg6L
-rw-r--r--src/http/static/pico.min.css4L
-rw-r--r--src/infrastructure/boot/environment.ts60L
-rw-r--r--src/infrastructure/boot/mailer.ts17L
-rw-r--r--src/infrastructure/boot/persistance.ts19L
-rw-r--r--src/infrastructure/boot/sms.ts16L
-rw-r--r--src/infrastructure/config/admin.ts20L
-rw-r--r--src/infrastructure/config/client.ts35L
-rw-r--r--src/infrastructure/config/factory.ts20L
-rw-r--r--src/infrastructure/fake/mailer.ts19L
-rw-r--r--src/infrastructure/fake/sms.ts18L
-rw-r--r--src/infrastructure/memory/auth.ts63L
-rw-r--r--src/infrastructure/memory/customer_info.ts43L
-rw-r--r--src/infrastructure/memory/factory.ts53L
-rw-r--r--src/infrastructure/memory/id_document.ts32L
-rw-r--r--src/infrastructure/memory/id_document_list.ts40L
-rw-r--r--src/infrastructure/memory/mapper/auth.ts73L
-rw-r--r--src/infrastructure/memory/mapper/id_document.ts98L
-rw-r--r--src/infrastructure/memory/mapper/oauth2flow.ts44L
-rw-r--r--src/infrastructure/memory/mapper/phone.ts54L
-rw-r--r--src/infrastructure/memory/mapper/ratelimit.ts27L
-rw-r--r--src/infrastructure/memory/oauth2_flow.ts45L
-rw-r--r--src/infrastructure/memory/phone.ts32L
-rw-r--r--src/infrastructure/memory/ratelimit.ts32L
-rw-r--r--src/infrastructure/postgres/auth.ts143L
-rw-r--r--src/infrastructure/postgres/customer_info.ts80L
-rw-r--r--src/infrastructure/postgres/error.ts27L
-rw-r--r--src/infrastructure/postgres/factory.ts29L
-rw-r--r--src/infrastructure/postgres/iddocument.ts103L
-rw-r--r--src/infrastructure/postgres/iddocument_list.ts46L
-rw-r--r--src/infrastructure/postgres/migrations/20240531140741_create_auth.ts42L
-rw-r--r--src/infrastructure/postgres/migrations/20240606001232_create_phone.ts30L
-rw-r--r--src/infrastructure/postgres/migrations/20240617195959_create_oauth2flow.ts28L
-rw-r--r--src/infrastructure/postgres/migrations/20240618073559_create_ratelimit.ts23L
-rw-r--r--src/infrastructure/postgres/migrations/20240619101025_create_iddocument.ts34L
-rw-r--r--src/infrastructure/postgres/oauth2_flow.ts120L
-rw-r--r--src/infrastructure/postgres/phone.ts109L
-rw-r--r--src/infrastructure/postgres/ratelimit.ts94L
-rw-r--r--src/infrastructure/postgres/seeds/.gitkeep0B
-rw-r--r--src/infrastructure/smtp/auth.ts49L
-rw-r--r--src/infrastructure/smtp/factory.ts20L
-rw-r--r--src/infrastructure/swisscom/ekyc_send_sms_challenge.ts59L
-rw-r--r--src/infrastructure/swisscom/factory.ts16L
-rw-r--r--src/infrastructure/tesseract/factory.ts17L
-rw-r--r--src/infrastructure/tesseract/models/ocrb.traineddata11397113B
-rw-r--r--src/infrastructure/tesseract/mrz_scan.ts71L
-rw-r--r--src/tests/acceptance.ts13L
-rw-r--r--src/tests/auth_email_challenge.test.ts130L
-rw-r--r--src/tests/auth_email_verify.test.ts111L
-rw-r--r--src/tests/auth_register.test.ts68L
-rw-r--r--src/tests/auth_repository.test.ts126L
-rw-r--r--src/tests/phone_repository.test.ts121L