service-captcha/config/captcha.php
Leonid Nikitin 520a3ba068
Revived API POST /api/v1/captcha.
Captcha validation has been adjusted.
2023-11-26 15:09:42 +06:00

138 lines
4.7 KiB
PHP

<?php
return [
'waiting_for_captcha_verification_in_seconds' => env('WAITING_FOR_CAPTCHA_VERIFICATION_IN_SECONDS', 900),
'validate_max_count_errors' => env('CAPTCHA_VALIDATE_MAX_COUNT_ERRORS', 3),
'imageClass' => \App\Captcha\Images\Image::class,
'types' => [
'string' => [
'class' => \App\Captcha\Types\StringType::class,
'params' => [
'symbols' => [
'A', 'B', 'C', 'D', 'E',
'K', 'L', 'M', 'N', 'O',
'1', '2', '3', '4', '5',
'F', 'G', 'H', 'I', 'J',
'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y',
'6', '7', '8', '9', 'Z'
],
/**
* Set array for min and max or integer.
*/
'length_symbols' => [3, 5],
/**
* Set array for min and max or integer. To disable it, set 0 or false or null.
*/
'length_fake_symbols' => [0, 5],
]
],
],
'image_head' => [
'width' => 500,
'height' => 75,
'text_padding_top' => 5,
'text_padding_left' => 10,
'backgrounds' => [
resource_path('captcha/backgrounds-head/01.png'),
resource_path('captcha/backgrounds-head/02.png'),
resource_path('captcha/backgrounds-head/03.png'),
resource_path('captcha/backgrounds-head/04.png'),
resource_path('captcha/backgrounds-head/05.png'),
resource_path('captcha/backgrounds-head/06.png'),
resource_path('captcha/backgrounds-head/07.png'),
resource_path('captcha/backgrounds-head/08.png'),
resource_path('captcha/backgrounds-head/09.png'),
resource_path('captcha/backgrounds-head/10.png'),
resource_path('captcha/backgrounds-head/11.png'),
resource_path('captcha/backgrounds-head/12.png'),
resource_path('captcha/backgrounds-head/r1.jpg'),
resource_path('captcha/backgrounds-head/r2.jpg'),
resource_path('captcha/backgrounds-head/r3.jpg'),
resource_path('captcha/backgrounds-head/r4.jpg'),
resource_path('captcha/backgrounds-head/r5.jpg'),
],
'angle' => 20,
'fonts' => [
resource_path('captcha/fonts/ABeeZee_regular.ttf'),
resource_path('captcha/fonts/Asap_700.ttf'),
resource_path('captcha/fonts/Khand_500.ttf'),
resource_path('captcha/fonts/Open_Sans_regular.ttf'),
resource_path('captcha/fonts/Roboto_regular.ttf'),
resource_path('captcha/fonts/Ubuntu_regular.ttf'),
],
'font_colors' => [
'#2c3e50',
'#c0392b',
'#16a085',
'#c0392b',
'#8e44ad',
'#303f9f',
'#f57c00',
'#795548',
"#006600",
"#005db9",
"#aa002a",
"#875400",
"#6e3700",
"#660033",
"#fde98e",
"#60c1ff",
"#fcb08e",
"#fb88ff",
"#b4fed4",
"#cbfaa9",
],
'number_lines' => 3,
'line_colors' => [],
],
'image_body' => [
'width' => 500,
'height' => 500,
'backgrounds' => [
resource_path('captcha/backgrounds-body/1.jpg'),
resource_path('captcha/backgrounds-body/2.jpg'),
resource_path('captcha/backgrounds-body/3.jpg'),
resource_path('captcha/backgrounds-body/4.jpg'),
resource_path('captcha/backgrounds-body/5.jpg'),
],
'angle' => 50,
'fonts' => [
resource_path('captcha/fonts/ABeeZee_regular.ttf'),
resource_path('captcha/fonts/Asap_700.ttf'),
resource_path('captcha/fonts/Khand_500.ttf'),
resource_path('captcha/fonts/Open_Sans_regular.ttf'),
resource_path('captcha/fonts/Roboto_regular.ttf'),
resource_path('captcha/fonts/Ubuntu_regular.ttf'),
],
'font_colors' => [
'#2c3e50',
'#c0392b',
'#16a085',
'#c0392b',
'#8e44ad',
'#303f9f',
'#f57c00',
'#795548',
"#006600",
"#005db9",
"#aa002a",
"#875400",
"#6e3700",
"#660033",
"#fde98e",
"#60c1ff",
"#fcb08e",
"#fb88ff",
"#b4fed4",
"#cbfaa9",
],
/**
* Set array for min and max or integer.
*/
'font_size' => [20, 50],
'number_lines' => 3,
'line_colors' => [],
]
];