You are here

public function UsersJwtKeyRepositoryInterface::saveKey in JSON Web Token Authentication (JWT) 8

Save a key for a user account.

Parameters

int $uid: The user account ID the data is associated with.

string $id: The unique name of the key.

string $alg: The JWT algorithm to use. e.g. 'RS256'.

string $pubkey: The value to store.

Return value

\Drupal\users_jwt\UsersKey The values of the key that were saved.

Throws

\InvalidArgumentException If the $id is empty or used by another user (i.e. not unique).

1 method overrides UsersJwtKeyRepositoryInterface::saveKey()
UsersJwtKeyRepository::saveKey in modules/users_jwt/src/UsersJwtKeyRepository.php
Save a key for a user account.

File

modules/users_jwt/src/UsersJwtKeyRepositoryInterface.php, line 41

Class

UsersJwtKeyRepositoryInterface
Interface UsersJwtKeyRepositoryInterface

Namespace

Drupal\users_jwt

Code

public function saveKey($uid, $id, $alg, $pubkey) : UsersKey;