From 05b510d9abdf59e80e6f65fbc62dce822c405cc3 Mon Sep 17 00:00:00 2001 From: "github-action[bot]" <> Date: Sat, 16 Sep 2023 16:44:29 +0000 Subject: [PATCH] Update Flex endpoint --- RECIPES.md | 1 + alexgeno.phone-verification-bundle.1.0.json | 77 +++++++++++++++++++ ...d032731bf39795d733b1b5d00fa99350de304.json | 77 +++++++++++++++++++ index.json | 3 + 4 files changed, 158 insertions(+) create mode 100644 alexgeno.phone-verification-bundle.1.0.json create mode 100644 archived/alexgeno.phone-verification-bundle/752d032731bf39795d733b1b5d00fa99350de304.json diff --git a/RECIPES.md b/RECIPES.md index 9f247a79..2b86ece8 100644 --- a/RECIPES.md +++ b/RECIPES.md @@ -15,6 +15,7 @@ Additional recipes can be found on the [Main Recipes Repository](https://github. | [ajgl/breakpoint-twig-extension](https://packagist.org/packages/ajgl/breakpoint-twig-extension) | [0.3](ajgl/breakpoint-twig-extension/0.3) | | [akondas/symfony-consul-bundle](https://packagist.org/packages/akondas/symfony-consul-bundle) | [0.1](akondas/symfony-consul-bundle/0.1) | | [alexandret/evc-bundle](https://packagist.org/packages/alexandret/evc-bundle) | [1.0](alexandret/evc-bundle/1.0) | +| [alexgeno/phone-verification-bundle](https://packagist.org/packages/alexgeno/phone-verification-bundle) | [1.0](alexgeno/phone-verification-bundle/1.0) | | [algolia/algolia-search-bundle](https://packagist.org/packages/algolia/algolia-search-bundle) | [2.2](algolia/algolia-search-bundle/2.2) | | [algolia/search-bundle](https://packagist.org/packages/algolia/search-bundle) | [3.0](algolia/search-bundle/3.0) | | [ambient-link/ability-sdk](https://packagist.org/packages/ambient-link/ability-sdk) | [1.0](ambient-link/ability-sdk/1.0) | diff --git a/alexgeno.phone-verification-bundle.1.0.json b/alexgeno.phone-verification-bundle.1.0.json new file mode 100644 index 00000000..8a4f20d6 --- /dev/null +++ b/alexgeno.phone-verification-bundle.1.0.json @@ -0,0 +1,77 @@ +{ + "manifests": { + "alexgeno/phone-verification-bundle": { + "manifest": { + "bundles": { + "AlexGeno\\PhoneVerificationBundle\\AlexGenoPhoneVerificationBundle": [ + "all" + ] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "#0": "1000..9999", + "PHONE_VERIFICATION_OTP_LENGTH": "4", + "#1": "for every 'to' no more than 10 initiations over 24 hours", + "PHONE_VERIFICATION_RATE_LIMIT_INITIATE_PERIOD_SECS": "86400", + "PHONE_VERIFICATION_RATE_LIMIT_INITIATE_COUNT": "10", + "#2": "for every 'to' no more than 5 failed completions over 5 minutes", + "PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_PERIOD_SECS": "300", + "PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_COUNT": "5" + }, + "add-lines": [ + { + "file": "config/packages/snc_redis.yaml", + "position": "after_target", + "warn_if_missing": true, + "target": " clients:", + "content": " default:\n type: predis\n alias: default\n dsn: \"%env(REDIS_URL)%\"" + } + ] + }, + "files": { + "config/packages/alex_geno_phone_verification.yaml": { + "contents": [ + "alex_geno_phone_verification:", + " storage:", + " driver: redis # redis || mongodb", + " redis:", + " connection: default", + " mongodb:", + " connection: default", + " sender:", + " transport: vonage", + " manager:", + " otp:", + " length: '%env(int:PHONE_VERIFICATION_OTP_LENGTH)%'", + " rate_limits:", + " initiate: #for every 'to' no more than 'count' initiations over 'period_secs' seconds", + " period_secs: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_INITIATE_PERIOD_SECS)%'", + " count: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_INITIATE_COUNT)%'", + " complete: #for every 'to' no more than 'count' failed completions over 'period_secs' seconds", + " period_secs: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_PERIOD_SECS)%' # this is also the expiration period for OTP", + " count: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_COUNT)%'", + "" + ], + "executable": false + }, + "config/routes/alex_geno_phone_verification.yaml": { + "contents": [ + "phone_verification_initiate:", + " path: /phone-verification/initiate/{to}", + " controller: AlexGeno\\PhoneVerificationBundle\\Controller\\PhoneVerificationController::initiate", + " methods: POST", + "phone_verification_complete:", + " path: /phone-verification/complete/{to}/{otp}", + " controller: AlexGeno\\PhoneVerificationBundle\\Controller\\PhoneVerificationController::complete", + " methods: POST", + "" + ], + "executable": false + } + }, + "ref": "752d032731bf39795d733b1b5d00fa99350de304" + } + } +} diff --git a/archived/alexgeno.phone-verification-bundle/752d032731bf39795d733b1b5d00fa99350de304.json b/archived/alexgeno.phone-verification-bundle/752d032731bf39795d733b1b5d00fa99350de304.json new file mode 100644 index 00000000..8a4f20d6 --- /dev/null +++ b/archived/alexgeno.phone-verification-bundle/752d032731bf39795d733b1b5d00fa99350de304.json @@ -0,0 +1,77 @@ +{ + "manifests": { + "alexgeno/phone-verification-bundle": { + "manifest": { + "bundles": { + "AlexGeno\\PhoneVerificationBundle\\AlexGenoPhoneVerificationBundle": [ + "all" + ] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "#0": "1000..9999", + "PHONE_VERIFICATION_OTP_LENGTH": "4", + "#1": "for every 'to' no more than 10 initiations over 24 hours", + "PHONE_VERIFICATION_RATE_LIMIT_INITIATE_PERIOD_SECS": "86400", + "PHONE_VERIFICATION_RATE_LIMIT_INITIATE_COUNT": "10", + "#2": "for every 'to' no more than 5 failed completions over 5 minutes", + "PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_PERIOD_SECS": "300", + "PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_COUNT": "5" + }, + "add-lines": [ + { + "file": "config/packages/snc_redis.yaml", + "position": "after_target", + "warn_if_missing": true, + "target": " clients:", + "content": " default:\n type: predis\n alias: default\n dsn: \"%env(REDIS_URL)%\"" + } + ] + }, + "files": { + "config/packages/alex_geno_phone_verification.yaml": { + "contents": [ + "alex_geno_phone_verification:", + " storage:", + " driver: redis # redis || mongodb", + " redis:", + " connection: default", + " mongodb:", + " connection: default", + " sender:", + " transport: vonage", + " manager:", + " otp:", + " length: '%env(int:PHONE_VERIFICATION_OTP_LENGTH)%'", + " rate_limits:", + " initiate: #for every 'to' no more than 'count' initiations over 'period_secs' seconds", + " period_secs: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_INITIATE_PERIOD_SECS)%'", + " count: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_INITIATE_COUNT)%'", + " complete: #for every 'to' no more than 'count' failed completions over 'period_secs' seconds", + " period_secs: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_PERIOD_SECS)%' # this is also the expiration period for OTP", + " count: '%env(int:PHONE_VERIFICATION_RATE_LIMIT_COMPLETE_COUNT)%'", + "" + ], + "executable": false + }, + "config/routes/alex_geno_phone_verification.yaml": { + "contents": [ + "phone_verification_initiate:", + " path: /phone-verification/initiate/{to}", + " controller: AlexGeno\\PhoneVerificationBundle\\Controller\\PhoneVerificationController::initiate", + " methods: POST", + "phone_verification_complete:", + " path: /phone-verification/complete/{to}/{otp}", + " controller: AlexGeno\\PhoneVerificationBundle\\Controller\\PhoneVerificationController::complete", + " methods: POST", + "" + ], + "executable": false + } + }, + "ref": "752d032731bf39795d733b1b5d00fa99350de304" + } + } +} diff --git a/index.json b/index.json index 694a1a80..45b83d7e 100644 --- a/index.json +++ b/index.json @@ -34,6 +34,9 @@ "alexandret/evc-bundle": [ "1.0" ], + "alexgeno/phone-verification-bundle": [ + "1.0" + ], "algolia/algolia-search-bundle": [ "2.2" ],