hasHeader('private-token')) { return false; } $captchaToken = $captchaTokenRepository->getCaptchaTokenByPrivateToken($this->header('private-token')); if (is_null($captchaToken)) { return false; } $this->captchaToken = $captchaToken; return true; } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ 'user_agent' => ['nullable', 'string'], ]; } public function getDto(): VerificationInformationDto { $httpUserData = new HttpUserData( $this->getClientIp(), $this->userAgent(), $this->header('referer') ); return new VerificationInformationDto( captchaToken: $this->captchaToken, httpUserData: $httpUserData, userAgent: $this->input('user_agent', null), ); } }