jwt.php
Table of Contents
Classes
- Jwt
- $s = Jwt::encode(['user_id'=>100,'t'=>['s'=>2]]); pr(Jwt::decode($s));
Functions
- api() : mixed
- 返回接口AUTHORIZATION解密后数组 返回{user_id:'',time:int}
- api_admin() : mixed
- 接口是否是管理员
- get_author() : mixed
- 解析 HTTP_AUTHORIZATION
Functions
api()
返回接口AUTHORIZATION解密后数组 返回{user_id:'',time:int}
api([mixed $show_error = true ]) : mixed
Parameters
- $show_error : mixed = true
api_admin()
接口是否是管理员
api_admin() : mixed
get_author()
解析 HTTP_AUTHORIZATION
get_author([mixed $sign = null ][, mixed $ignore_time_check = false ][, mixed $show_error = true ]) : mixed
Parameters
- $sign : mixed = null
- $ignore_time_check : mixed = false
- $show_error : mixed = true