Skip to content

Commit 848c212

Browse files
committed
add certificateLifetimeSeconds option to createCredentials endpoint
Introduce WorkspaceStorageCredentialsCreateRequest DTO with optional certificateLifetimeSeconds parameter. Update controller to accept request body and pass lifetime to processor. Update storage-api PHP client to forward options array.
1 parent a10ef87 commit 848c212

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Keboola/StorageApi/Workspaces.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,12 @@ public function resetCredentials(
324324
));
325325
}
326326

327-
public function createCredentials(int|string $workspaceId): array
327+
/**
328+
* @param array{publicKey?: string, certificateLifetimeSeconds?: int} $options
329+
*/
330+
public function createCredentials(int|string $workspaceId, array $options = []): array
328331
{
329-
$result = $this->client->apiPostJson("workspaces/{$workspaceId}/credentials");
332+
$result = $this->client->apiPostJson("workspaces/{$workspaceId}/credentials", $options);
330333
assert(is_array($result));
331334
return $result;
332335
}

0 commit comments

Comments
 (0)