Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117820298
D5616.1775294747.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5616.1775294747.diff
View Options
diff --git a/src/app/Console/Commands/Data/InitCommand.php b/src/app/Console/Commands/Data/InitCommand.php
--- a/src/app/Console/Commands/Data/InitCommand.php
+++ b/src/app/Console/Commands/Data/InitCommand.php
@@ -134,5 +134,27 @@
$client->id = \config('auth.synapse.client_id');
$client->save();
}
+
+ // Inject extra passport clients
+ if (!empty(\config('auth.extra_passport_clients'))) {
+ foreach (\config('auth.extra_passport_clients') as $clientConfig) {
+ if (!Passport::client()->where('id', $clientConfig['id'])->exists()) {
+ \Log::info("Creating client ". $clientConfig['id']);
+ $client = Passport::client()->forceFill([
+ 'user_id' => null,
+ 'name' => $clientConfig['name'],
+ 'secret' => $clientConfig['secret'],
+ 'provider' => $clientConfig['provider'],
+ 'redirect' => $clientConfig['redirect'],
+ 'personal_access_client' => $clientConfig['personal_access_client'],
+ 'password_client' => $clientConfig['password_client'],
+ 'revoked' => $clientConfig['revoked'],
+ 'allowed_scopes' => $clientConfig['allowed_scopes'],
+ ]);
+ $client->id = $clientConfig['id'];
+ $client->save();
+ }
+ }
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 9:25 AM (9 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18824625
Default Alt Text
D5616.1775294747.diff (1 KB)
Attached To
Mode
D5616: Support injecting extra passport clients via override.php
Attached
Detach File
Event Timeline