37 lines
755 B
PHP
37 lines
755 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\Api\V1;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class RefreshRequest extends FormRequest
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* 요청 권한 확인
|
||
|
|
*/
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true; // API 키 인증은 미들웨어에서 처리
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 유효성 검사 규칙
|
||
|
|
*/
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'refresh_token' => 'required|string',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 에러 메시지 커스터마이징
|
||
|
|
*/
|
||
|
|
public function messages(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'refresh_token.required' => __('error.refresh_token_required'),
|
||
|
|
'refresh_token.string' => __('error.refresh_token_invalid'),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|