class UsersKey in JSON Web Token Authentication (JWT) 8
Class UsersKey
A simple data object.
Hierarchy
- class \Drupal\users_jwt\UsersKey
Expanded class hierarchy of UsersKey
3 files declare their use of UsersKey
- UsersGenerateKeyForm.php in modules/
users_jwt/ src/ Form/ UsersGenerateKeyForm.php - UsersJwtAuth.php in modules/
users_jwt/ src/ Authentication/ Provider/ UsersJwtAuth.php - UsersKeyForm.php in modules/
users_jwt/ src/ Form/ UsersKeyForm.php
File
- modules/
users_jwt/ src/ UsersKey.php, line 10
Namespace
Drupal\users_jwtView source
class UsersKey {
/**
* The user ID.
*
* @var int
*/
public $uid;
/**
* The key ID.
*
* @var string
*/
public $id;
/**
* The key algorithm.
*
* @var string
*/
public $alg;
/**
* The public key.
*
* @var string
*/
public $pubkey;
/**
* UsersKey constructor.
*
* @param int $uid
* A user ID.
* @param string $id
* A key ID.
* @param string $alg
* A key algorithm like RS256.
* @param string $pubkey
* The value of a public key, e.g. RSA or Ed25519.
*/
public function __construct($uid = NULL, $id = NULL, $alg = NULL, $pubkey = NULL) {
if ($uid) {
$this->uid = (int) $uid;
}
if ($id) {
$this->id = trim((string) $id);
}
if ($alg) {
$this->alg = trim((string) $alg);
}
if ($pubkey) {
$this->pubkey = trim((string) $pubkey);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UsersKey:: |
public | property | The key algorithm. | |
UsersKey:: |
public | property | The key ID. | |
UsersKey:: |
public | property | The public key. | |
UsersKey:: |
public | property | The user ID. | |
UsersKey:: |
public | function | UsersKey constructor. |