Skip to content

JwtUtils ​

final class · pocketmine\network\mcpe\JwtUtils · source

Constants ​

BEDROCK_SIGNING_KEY_CURVE_NAME ​

php
public const BEDROCK_SIGNING_KEY_CURVE_NAME = "secp384r1"

Methods ​

b64UrlDecode() ​

php
public static function b64UrlDecode(string $str) : string

b64UrlEncode() ​

php
public static function b64UrlEncode(string $str) : string

create() ​

php
public static function create(array $header, array $claims, \OpenSSLAsymmetricKey $signingKey) : string

derPublicKeyToPem() ​

php
public static function derPublicKeyToPem(string $derKey) : string

emitDerPublicKey() ​

php
public static function emitDerPublicKey(\OpenSSLAsymmetricKey $opensslKey) : string

parse() ​

php
public static function parse(string $token) : array

TODO: replace this result with an object

parseDerPublicKey() ​

php
public static function parseDerPublicKey(string $derKey) : \OpenSSLAsymmetricKey

rsaPublicKeyModExpToDer() ​

php
public static function rsaPublicKeyModExpToDer(string $nBase64, string $eBase64) : string

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

split() ​

php
public static function split(string $jwt) : array

verify() ​

php
public static function verify(string $jwt, string $signingKeyDer, bool $ec) : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.