Skip to content

Commit 4e7aad0

Browse files
committed
Remove STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE
1 parent b692202 commit 4e7aad0

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ Please check the [Laravel support policy](https://laravel.com/docs/master/releas
4747
'service_account_email' => env('STACKKIT_CLOUD_TASKS_SERVICE_EMAIL', ''),
4848
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', true),
4949

50-
// Optional
51-
'credential_file' => env('STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE', ''),
52-
5350
// Required when using AppEngine
5451
'app_engine' => env('STACKKIT_APP_ENGINE_TASK', false),
5552
'app_engine_service' => env('STACKKIT_APP_ENGINE_SERVICE', ''),
@@ -82,7 +79,6 @@ Please check the table below on what the values mean and what their value should
8279
| `STACKKIT_CLOUD_TASKS_PROJECT` | The project your queue belongs to. |`my-project`
8380
| `STACKKIT_CLOUD_TASKS_LOCATION` | The region where the project is hosted. |`europe-west6`
8481
| `STACKKIT_CLOUD_TASKS_QUEUE` | The default queue a job will be added to. |`emails`
85-
| `STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE` (optional) | A json credential file to authenticate the connection (from outside AppEngine) |`project-123.json`
8682
| **App Engine**
8783
| `STACKKIT_APP_ENGINE_TASK` (optional) | Set to true to use App Engine task (else a Http task will be used). Defaults to false. |`true`
8884
| `STACKKIT_APP_ENGINE_SERVICE` (optional) | The App Engine service to handle the task (only if using App Engine task). |`api`
@@ -150,7 +146,7 @@ The dashboard is accessible at the URI: /cloud-tasks
150146
<summary>Authentication</summary>
151147
<br>
152148

153-
Set the `STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE` environment variable with a path to the credentials file.
149+
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with a path to the credentials file.
154150

155151
More info: https://cloud.google.com/docs/authentication/production
156152

src/CloudTasksServiceProvider.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@ public function boot(): void
2929

3030
private function registerClient(): void
3131
{
32-
$this->app->singleton(CloudTasksClient::class, function ($app) {
33-
$config = config('queue.connections.cloudtasks');
34-
$options = [];
35-
if (!empty($config['credential_file'])) {
36-
$options['credentials'] = $config['credential_file'];
37-
}
38-
return new CloudTasksClient($options);
32+
$this->app->singleton(CloudTasksClient::class, function () {
33+
return new CloudTasksClient();
3934
});
4035

4136
$this->app->bind('open-id-verificator', OpenIdVerificatorConcrete::class);

0 commit comments

Comments
 (0)