Crate kjwt

Crate kjwt 

Source
Expand description

JSON Web Token generation and verification lightweight library, hash algorithm currently only supports hs256

author: kiven lee date: 2023-07-01

Structs§

JwtError

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