Revived API /api/v1/captcha.

Now a new captcha is created to check for a bot.
This commit is contained in:
2023-09-19 14:27:33 +06:00
parent 56cd409301
commit 27046e6674
22 changed files with 525 additions and 101 deletions

View File

@@ -10,7 +10,7 @@ use App\Captcha\Images\Body;
use App\Captcha\Images\Head;
use App\Captcha\Images\ImageManager;
use App\Captcha\Images\Lines;
use App\Services\Api\V1\CaptchaService;
use App\Services\Api\V1\CaptchaGenerateService;
use App\Services\CaptchaToken\CaptchaTokenHandler;
use App\Services\GenerateTokenCommand\GenerateTokenUlidCommand;
use App\Services\GenerateTokenCommand\GenerateTokenUuidCommand;
@@ -39,8 +39,8 @@ final class AppServiceProvider extends ServiceProvider
return new CreateSearchInstanceCommand(Search::class);
});
$this->app->bind(CaptchaService::class, function (Application $app) {
return new CaptchaService(
$this->app->bind(CaptchaGenerateService::class, function (Application $app) {
return new CaptchaGenerateService(
config: config('captcha', []),
imageHead: $app->make(ImageHead::class),
imageBody: $app->make(ImageBody::class)