November 2018
Intermediate to advanced
388 pages
9h 5m
English
The second part of the JWT token is the payload. Here, we have a set of claims that are again represented as a JSON object:
{ "sub": "testuserid", "name": "Test User", "aud": [ "https://myserver.com/jwt_token", "http://localhost/jwt_token" ], "iat": 1534935981, "exp": 1534937448}
Here, the sub—the subject of the claim—is an identifier. The claim can have a name value, and iat is the timestamp that shows at which point the token is issued. The exp is the timestamp, indicating at which point the token will expire. The timestamps are shown in epoch format.
aud is the audience claim that identifies the recipients that the JWT is intended for. Generally, the aud value is an array of case-sensitive strings, each containing a string or URI ...
Read now
Unlock full access