class JWT

Methods

static string
getJWT(string $private_key_path, int $iss)

GitHub App 由 JWT expire 10m 获取 Token expire 60m.

static string
encode(string $privateKey, string $git_type, string $username, int $uid, int $exp = null)

PCIT 加密 token.

static object
decode(string $jwt, string $publicKey)

解密 token.

Details

at line 18
static string getJWT(string $private_key_path, int $iss)

GitHub App 由 JWT expire 10m 获取 Token expire 60m.

Parameters

string $private_key_path
int $iss

Return Value

string

See also

at line 40
static string encode(string $privateKey, string $git_type, string $username, int $uid, int $exp = null)

PCIT 加密 token.

Parameters

string $privateKey
string $git_type
string $username
int $uid
int $exp

Return Value

string

at line 64
static object decode(string $jwt, string $publicKey)

解密 token.

Parameters

string $jwt
string $publicKey

Return Value

object