Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8224071
OauthClientSeeder.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
OauthClientSeeder.php
View Options
<?php
namespace
Database\Seeds\Local
;
use
Laravel\Passport\Passport
;
use
Illuminate\Database\Seeder
;
class
OauthClientSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* This emulates './artisan passport:client --password --name="Kolab Password Grant Client" --provider=users'
*
* @return void
*/
public
function
run
()
{
$client
=
Passport
::
client
()->
forceFill
([
'user_id'
=>
null
,
'name'
=>
"Kolab Password Grant Client"
,
'secret'
=>
\config
(
'auth.proxy.client_secret'
),
'provider'
=>
'users'
,
'redirect'
=>
'https://'
.
\config
(
'app.website_domain'
),
'personal_access_client'
=>
0
,
'password_client'
=>
1
,
'revoked'
=>
false
,
]);
$client
->
id
=
\config
(
'auth.proxy.client_id'
);
$client
->
save
();
$companionAppClient
=
Passport
::
client
()->
forceFill
([
'user_id'
=>
null
,
'name'
=>
"CompanionApp Password Grant Client"
,
'secret'
=>
\config
(
'auth.companion_app.client_secret'
),
'provider'
=>
'users'
,
'redirect'
=>
'https://'
.
\config
(
'app.website_domain'
),
'personal_access_client'
=>
0
,
'password_client'
=>
1
,
'revoked'
=>
false
,
]);
$companionAppClient
->
id
=
\config
(
'auth.companion_app.client_id'
);
$companionAppClient
->
save
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 9, 9:33 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1057168
Default Alt Text
OauthClientSeeder.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment