28 lines
778 B
PHP
28 lines
778 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\OauthClient;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<OauthClient>
|
|
*/
|
|
class OauthClientFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => $this->faker->company(),
|
|
'logo_url' => $this->faker->optional()->imageUrl(),
|
|
'client_id' => 'client_'.$this->faker->unique()->regexify('[A-Za-z0-9]{24}'),
|
|
'client_secret_hash' => null,
|
|
'redirect_uris' => ['https://example.com/callback'],
|
|
'allowed_userinfo_fields' => ['sub', 'nickname', 'email'],
|
|
'userinfo_claim_remap' => [],
|
|
'is_confidential' => true,
|
|
'is_active' => true,
|
|
];
|
|
}
|
|
}
|