Skip to content
Sharp

Spring Security · interview question

What HTTP response code does Spring Security typically return for unauthorized requests?

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

Correct answer

A. 401

Why

Spring Security returns a 401 HTTP status code for unauthorized requests, indicating that the client must authenticate to gain network access.

Test yourself on Spring Security

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

Start free test
All Spring Security questions →