spring-projects / spring-authorization-server

Spring Authorization Server
https://spring.io/projects/spring-authorization-server
Apache License 2.0
4.78k stars 1.25k forks source link

return more specific http status codes in OAuth2ErrorAuthenticationFailureHandler #1643

Closed MatthiasWinzeler closed 2 weeks ago

MatthiasWinzeler commented 3 weeks ago

Currently, OAuth2ErrorAuthenticationFailureHandler always returns 400 Bad Request for all OAuth2 errors. There are some OAuth2 error codes that have clearly more matching http status codes, for example "unauthorized_client" could return a 401 Unauthorized etc.

Adresses https://github.com/spring-projects/spring-authorization-server/issues/1636.

jgrandja commented 2 weeks ago

Closing as per comment