🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: JWT and API Security: all 10 questions

Quiz: JWT and API Security · Question 2 of 10

Why did the forged token in the demo fail?

Why did the forged token in the demo fail?

  1. A.It had expired
  2. B.The algorithm was none
  3. C.Its signature no longer matched the edited payload
  4. D.The format was wrong
Answer & explanation

Correct answer: Its signature no longer matched the edited payload

The attacker changed role to admin but couldn't recompute the HMAC without the server secret.

Can you get the rest right without peeking?

Take the timed Quiz: JWT and API Security quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →