31 lines
991 B
PHP
31 lines
991 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateOauthClientRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['required', 'string', 'max:255'],
|
|
'logo_url' => ['nullable', 'url:http,https', 'max:255'],
|
|
'redirect_uris' => ['required', 'array', 'min:1'],
|
|
'redirect_uris.*' => ['required', 'url:http,https', 'max:500'],
|
|
'scope_ids' => ['sometimes', 'array', 'min:1'],
|
|
'scope_ids.*' => ['integer', 'exists:oauth_scopes,id'],
|
|
'allowed_userinfo_fields' => ['required', 'array', 'min:1'],
|
|
'allowed_userinfo_fields.*' => ['string', 'max:60'],
|
|
'userinfo_claim_remap' => ['nullable', 'array'],
|
|
'userinfo_claim_remap.*' => ['string', 'max:60'],
|
|
'is_active' => ['sometimes', 'boolean'],
|
|
];
|
|
}
|
|
}
|