JwtBearerInterface
Implement this interface to specify where the OAuth2 Server should get the JWT key for clients
- Full name:
\OAuth2\Storage\JwtBearerInterface
Methods
getClientKey
Get the public key associated with a client_id
Parameters:
Parameter | Type | Description |
---|---|---|
$client_id |
mixed | Client identifier to be checked with. |
$subject |
mixed |
Return Value:
Return the public key for the client_id if it exists, and MUST return FALSE if it doesn't.
getJti
Get a jti (JSON token identifier) by matching against the client_id, subject, audience and expiration.
public getJti(mixed $client_id, mixed $subject, mixed $audience, mixed $expiration, mixed $jti): \OAuth2\Storage\An
Parameters:
Parameter | Type | Description |
---|---|---|
$client_id |
mixed | Client identifier to match. |
$subject |
mixed | The subject to match. |
$audience |
mixed | The audience to match. |
$expiration |
mixed | The expiration of the jti. |
$jti |
mixed | The jti to match. |
Return Value:
associative array as below, and return NULL if the jti does not exist. - issuer: Stored client identifier. - subject: Stored subject. - audience: Stored audience. - expires: Stored expiration in unix timestamp. - jti: The stored jti.
setJti
Store a used jti so that we can check against it to prevent replay attacks.
public setJti(mixed $client_id, mixed $subject, mixed $audience, mixed $expiration, mixed $jti): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$client_id |
mixed | Client identifier to insert. |
$subject |
mixed | The subject to insert. |
$audience |
mixed | The audience to insert. |
$expiration |
mixed | The expiration of the jti. |
$jti |
mixed | The jti to insert. |
Automatically generated on 2025-03-18