Expand description
JSON Web Token generation and verification lightweight library, hash algorithm currently only supports hs256
author: kiven lee date: 2023-07-01
Structs§
Constants§
- AUTHORIZATION
- BEARER
- EXP_KEY
- jwt body: 过期时间的键名
- ISSUER_
KEY - jwt body: 发布者的键名
- WWW_
AUTHENTICATE
Functions§
- check_
claims - verify claims iss and exp, use issuer
- check_
exp - Verify whether expire from jwt token
- check_
issuer - Verify whether the issuer is correct from jwt token
- decode
- Parsing and verifying jwt string, using jwt type HS256
- decode_
base64 - decode_
base64_ slice - decode_
custom - Parsing and verifying jwt string, using jwt type HS256
- encode
- Generate a jwt using the specified parameters, jwt type is HS256
- encode_
raw - Generate a jwt using the specified parameters, jwt type is HS256
- get_exp
- get expire from jwt token
- get_
issuer - get the issuer from jwt token
- get_
sign - Parsing jwt string and return sign base64 string
- jwt_
split - jwt_
split_ slice - unix_
timestamp_ after - get unix timestamp base now + after_now