mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-14 06:06:18 +00:00
26 lines
600 B
PHP
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);
|
|
}
|
|
} |