<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class RefreshTokenRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [];
    }

    // This adds the cookie value to the request data.
    protected function passedValidation(): void
    {
        $this->merge([
            'refresh_token' => $this->cookie('refresh_token'),
        ]);
    }
}
