Q: A JWT contains which of the following?
-
A
header, payload, and signature delimited by dots(.)
-
B
header, footer, and signature delimited by by dots(.)
-
C
header, signature, and footer delimited by dots(.)
A
Answer:
A
Explanation:
Correct option:
header, payload, and signature delimited by dots(.)
Explanation:
A JSON Web Token (JWT) consists of three parts:
- Header: Contains metadata about the token, such as the signing algorithm.
- Payload: Contains the claims or the data that is being transmitted.
- Signature: Ensures the integrity of the token and verifies that it was not tampered with.
These three parts are separated by dots (.) in the JWT format, i.e., header.payload.signature.
The other options (footer and signature or footer and header) are incorrect.
Related Topic:
Share Above MCQ