RefreshTokenRequest.php 483 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class RefreshTokenRequest extends FormRequest
  5. {
  6. public function authorize(): bool
  7. {
  8. return true;
  9. }
  10. public function rules(): array
  11. {
  12. return [];
  13. }
  14. //This adds the cookie value to the request data.
  15. protected function passedValidation(): void
  16. {
  17. $this->merge([
  18. 'refresh_token' => $this->cookie('refresh_token'),
  19. ]);
  20. }
  21. }