Skip to content
Sharp

Spring Security · interview question

Why does the CSRF token in Spring Security matter in this design?

Multiple choiceMediumchapter-17-curatedpremiumspring-securityspring-security-filter-chain
Choose one answer
Answer and explanation

Correct answer

D. It prevents unauthorized cross-site requests.

Why

CSRF tokens are used to prevent cross-site request forgery attacks. They ensure that requests made to the server are from authenticated users and not from malicious sites.

Test yourself on Spring Security

A free test with instant, explained results. No account needed.

Start free test
All Spring Security questions →