Current location - Quotes Website - Personality signature - What's the use of Zhiwei Thompson
What's the use of Zhiwei Thompson
JWT is the abbreviation of JSON WEB TOKEN, which is a JSON object that can be transmitted safely based on RFC 75 19 standard. Because it uses digital signature, it is credible and secure.

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).