From what I can tell, the C # JwtSecurityToken not intended to encrypt its contents (it seems your question seems to be). Instead, it is intended to sign its contents. This corresponds to a typical token security model. It should be part of information that is otherwise protected.
The difference is that you are not trying to hide any information, you are just checking the source of the information (as well as the integrity, but this is connected).
For example, Twitter can give you a token with the data "eddyuk", "eddyuk awesome application" and assume that it is enough for authorization. In order to prevent me from making my own token for the same purpose, they can sign it, so an exact copy of the original token is required for use.
This serves two purposes: you do not need to remove the complex mapping scheme, and if your signature method is secure, it is impossible to guess.
Please note that there is a way to store encrypted information in a token using some other implementations, but C # 1 does not support this functionality.
Guvante
source share