The format of JWT token: header.payload.signature
Generation algorithm for storing signatures in the header
{"alg ":" hs 5 12"} copied to the clipboard or copied.
The payload is used to store the user name, the generation time and the expiration time of the token.
{"sub":"admin ","created ":1489079981393," exp ": 148968478 1} copied to the clipboard or copied.
A signature is a signature generated by a header and a payload. Once the header and payload are tampered with, the verification will fail.
//secret is the key string signature of the encryption algorithm = hmacsha512 (base64 urlencode (header)+"." +base64 urlencode (payload), secret).