class JWTController

Methods

static array
getUser(bool $returnGitTypeFirst = true)

No description

static array
check(int $build_key_id)

检查 token 是否有某构建的权限.

static array
checkByRepo(string $username, string $repo_name)

检查 Token 是否有某仓库的权限.

static string
generate(string $git_type = null, string $username = null, int $uid = null)

生成 API Token.

Details

at line 45
static array getUser(bool $returnGitTypeFirst = true)

Parameters

bool $returnGitTypeFirst

Return Value

array

Exceptions

Exception

at line 72
static array check(int $build_key_id)

检查 token 是否有某构建的权限.

Parameters

int $build_key_id

Return Value

array

Exceptions

Exception

at line 104
static array checkByRepo(string $username, string $repo_name)

检查 Token 是否有某仓库的权限.

Token 的 uid 是否在给定仓库的管理员列表中

Parameters

string $username
string $repo_name

Return Value

array

Exceptions

Exception

at line 131
static string generate(string $git_type = null, string $username = null, int $uid = null)

生成 API Token.

Parameters

string $git_type
string $username
int $uid

Return Value

string

Exceptions

Exception