PocketMine-MP 5.35.1 git-e32e836dad793a3a3c8ddd8927c00e112b1e576a
Loading...
Searching...
No Matches
pocketmine\network\mcpe\JwtUtils Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\JwtUtils:

Static Public Member Functions

static b64UrlDecode (string $str)
 
static b64UrlEncode (string $str)
 
static create (array $header, array $claims, \OpenSSLAsymmetricKey $signingKey)
 
static derPublicKeyToPem (string $derKey)
 
static emitDerPublicKey (\OpenSSLAsymmetricKey $opensslKey)
 
static parse (string $token)
 
static parseDerPublicKey (string $derKey)
 
static rsaPublicKeyModExpToDer (string $nBase64, string $eBase64)
 
static split (string $jwt)
 
static verify (string $jwt, string $signingKeyDer, bool $ec)
 

Public Attributes

const BEDROCK_SIGNING_KEY_CURVE_NAME = "secp384r1"
 

Detailed Description

Definition at line 64 of file JwtUtils.php.

Member Function Documentation

◆ b64UrlDecode()

static pocketmine\network\mcpe\JwtUtils::b64UrlDecode ( string $str)
static

Definition at line 221 of file JwtUtils.php.

◆ b64UrlEncode()

static pocketmine\network\mcpe\JwtUtils::b64UrlEncode ( string $str)
static

Definition at line 217 of file JwtUtils.php.

◆ create()

static pocketmine\network\mcpe\JwtUtils::create ( array $header,
array $claims,
\OpenSSLAsymmetricKey $signingKey )
static

@phpstan-param array<string, mixed> $header @phpstan-param array<string, mixed> $claims

Definition at line 201 of file JwtUtils.php.

◆ derPublicKeyToPem()

static pocketmine\network\mcpe\JwtUtils::derPublicKeyToPem ( string $derKey)
static

Definition at line 271 of file JwtUtils.php.

◆ emitDerPublicKey()

static pocketmine\network\mcpe\JwtUtils::emitDerPublicKey ( \OpenSSLAsymmetricKey $opensslKey)
static

Definition at line 232 of file JwtUtils.php.

◆ parse()

static pocketmine\network\mcpe\JwtUtils::parse ( string $token)
static

TODO: replace this result with an object

Returns
mixed[] @phpstan-return array{mixed[], mixed[], string}
Exceptions
JwtException

Definition at line 96 of file JwtUtils.php.

◆ parseDerPublicKey()

static pocketmine\network\mcpe\JwtUtils::parseDerPublicKey ( string $derKey)
static

Definition at line 263 of file JwtUtils.php.

◆ rsaPublicKeyModExpToDer()

static pocketmine\network\mcpe\JwtUtils::rsaPublicKeyModExpToDer ( string $nBase64,
string $eBase64 )
static

Create a public key represented in DER format from RSA modulus and exponent information

Parameters
string$nBase64The RSA modulus encoded in Base64
string$eBase64The RSA exponent encoded in Base64

Definition at line 281 of file JwtUtils.php.

◆ split()

static pocketmine\network\mcpe\JwtUtils::split ( string $jwt)
static
Returns
string[] @phpstan-return array{string, string, string}
Exceptions
JwtException

Definition at line 78 of file JwtUtils.php.

◆ verify()

static pocketmine\network\mcpe\JwtUtils::verify ( string $jwt,
string $signingKeyDer,
bool $ec )
static
Exceptions
JwtException

Definition at line 177 of file JwtUtils.php.

Member Data Documentation

◆ BEDROCK_SIGNING_KEY_CURVE_NAME

const pocketmine\network\mcpe\JwtUtils::BEDROCK_SIGNING_KEY_CURVE_NAME = "secp384r1"

Definition at line 65 of file JwtUtils.php.


The documentation for this class was generated from the following file: