The length of the token generated by php-jwt is too long. Is there any way to reduce the length of the string?

the length of the token generated by php-jwt is too long. Is there any way to reduce the string length

Php
Mar.04,2021

JWT has an official standard, and the length is fixed. If the length of token is shortened in some way, it is no longer a legal JWT.
in addition, multiple JWT of dozens of characters in Header will not have any effect at all.


the length of jwt varies according to the content, not a fixed length. Because the content is stored in json format, the number of variables can be reduced as much as possible, and those that can be merged can be merged into one. The header of jwt can be stored on the server side, so the length of the generated string will be greatly reduced

.
Menu