Skip to content

Commit e185f2c

Browse files
committed
Theoretical fixes
1 parent aa2a345 commit e185f2c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/CloudTasksQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ protected function pushToCloudTasks($queue, $payload, $delay = 0)
168168

169169
$token = new OidcToken;
170170
$token->setServiceAccountEmail($this->config['service_account_email']);
171-
$token->setAudience($this->getAudience());
171+
if ($audience = $this->getAudience()) $token->setAudience($audience);
172172
$httpRequest->setOidcToken($token);
173173

174174
if ($availableAt > time()) {

src/Config.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ public static function getHandler($handler): string
8888
*/
8989
public static function getAudience(array $config): string
9090
{
91-
$handler = self::getHandler($config['handler']);
92-
9391
return $config['signed_audience'] ?? false
94-
? hash_hmac('sha256', $handler, config('app.key'))
95-
: $handler;
92+
? hash_hmac('sha256', self::getHandler($config['handler']), config('app.key'))
93+
: null;
9694
}
9795
}

0 commit comments

Comments
 (0)