JWK
in package
implements
JsonSerializable
Table of Contents
Interfaces
- JsonSerializable
Properties
- $values : array<string|int, mixed>
Methods
- __construct() : mixed
- Creates a JWK object using the given values.
- all() : array<string|int, mixed>
- Get all values stored in the JWK object.
- createFromJson() : JWK
- Creates a JWK object using the given Json string.
- get() : null|mixed
- Get the value with a specific key.
- has() : bool
- Returns true if the JWK has the value identified by.
- jsonSerialize() : array<string|int, mixed>
- Returns the values to be serialized.
- thumbprint() : string
- Returns the thumbprint of the key.
- toPublic() : JWK
- Returns the associated public key.
Properties
$values
private
array<string|int, mixed>
$values
= []
Methods
__construct()
Creates a JWK object using the given values.
public
__construct(array<string|int, mixed> $values) : mixed
The member "kty" is mandatory. Other members are NOT checked.
Parameters
- $values : array<string|int, mixed>
Tags
all()
Get all values stored in the JWK object.
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed> —Values of the JWK object
createFromJson()
Creates a JWK object using the given Json string.
public
static createFromJson(string $json) : JWK
Parameters
- $json : string
Tags
Return values
JWKget()
Get the value with a specific key.
public
get(string $key) : null|mixed
Parameters
- $key : string
-
The key
Tags
Return values
null|mixedhas()
Returns true if the JWK has the value identified by.
public
has(string $key) : bool
Parameters
- $key : string
-
The key
Return values
booljsonSerialize()
Returns the values to be serialized.
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>thumbprint()
Returns the thumbprint of the key.
public
thumbprint(string $hash_algorithm) : string
Parameters
- $hash_algorithm : string
Tags
Return values
stringtoPublic()
Returns the associated public key.
public
toPublic() : JWK
This method has no effect for:
- public keys
- shared keys
- unknown keys.
Known keys are "oct", "RSA", "EC" and "OKP".