Add captcha tokens management.

This commit is contained in:
2023-08-22 00:15:35 +06:00
parent d2b29e2225
commit 742b0feaf0
38 changed files with 832 additions and 6 deletions

View File

@@ -11,6 +11,9 @@ use App\Captcha\Images\Head;
use App\Captcha\Images\ImageManager;
use App\Captcha\Images\Lines;
use App\Services\Api\V1\CaptchaService;
use App\Services\CaptchaToken\CaptchaTokenHandler;
use App\Services\GenerateTokenCommand\GenerateTokenUlidCommand;
use App\Services\GenerateTokenCommand\GenerateTokenUuidCommand;
use App\Services\Search\CreateSearchInstanceCommand;
use App\Services\Search\Search;
use Illuminate\Contracts\Foundation\Application;
@@ -43,6 +46,13 @@ final class AppServiceProvider extends ServiceProvider
imageBody: $app->make(ImageBody::class)
);
});
$this->app->bind(CaptchaTokenHandler::class, function (Application $app) {
return new CaptchaTokenHandler(
generatePublicTokenCommand: $app->make(GenerateTokenUlidCommand::class),
generatePrivateTokenCommand: $app->make(GenerateTokenUuidCommand::class)
);
});
}
/**