Index

JWT

MMO\oauth\helpers · 1 symbol · generated 5 Oct 2026

class

JWT

JWT.php:11
class MMO\oauth\helpers\JWT implements JsonSerializable
Namespace
MMO\oauth\helpers
Implements
JsonSerializable

Constants1

SUPPORTED_ALGORITHM

const SUPPORTED_ALGORITHM = […6 items]

Properties9

data

array $data = []
Type
array

exp

int $exp = 0
Type
int

iat

int $iat = 0
Type
int

nbf

int $nbf = 0
Type
int

Methods5

Decode($encoded, $key)

staticJWT.php:95

Extract the claims from a JWT and validate them

static function Decode(string $encoded, MMO\oauth\keys\PublicKey|array|null $key = null): static
$encodedstringthe encoded JWT
$key = nullPublicKey | array | nulla list of public keys or a public key
returnsstatic

encode($key, $keyId, $algorithm)

JWT.php:62
function encode( ?MMO\oauth\keys\PrivateKey $key = null, ?string $keyId = null, string $algorithm = 'RS256' ): string
$key = nullnull | PrivateKey
$keyId = nullnull | string
$algorithm = 'RS256'string
returnsstring

__construct($claims)

JWT.php:43
function __construct(array $claims = [])
$claims = []array