Files
id/src/Id/Concerns/ManagesSshKeys.php
Maurice Preuß (envoyr) 4b23f6ddbb refactored code
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
2025-04-30 03:45:10 +02:00

26 lines
600 B
PHP

<?php
namespace Anikeen\Id\Concerns;
use Anikeen\Id\ApiOperations\Get;
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
use Anikeen\Id\Resources\SshKeys;
use GuzzleHttp\Exception\GuzzleException;
trait ManagesSshKeys
{
use Get;
/**
* Get currently authed user with Bearer Token.
*
* @throws RequestRequiresClientIdException
* @throws GuzzleException
*/
public function sshKeysByUserId(string $sskKeyId): SshKeys
{
return (new SshKeys($this->get(sprintf('v1/users/%s/ssh-keys/json', $sskKeyId))))
->setParent($this);
}
}