spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.73k stars 5.86k forks source link

Add support for RFC7807-style error responses #13598

Open steam0 opened 1 year ago

steam0 commented 1 year ago

Expected Behavior

There should be an option to enable RFC7807-style ProblemDetail-responses when using Spring Security 6.

Current Behavior

There is currently no option to enable this.

Context

For the last three years, our company have used RFC7807 problem responses in our Spring Applications, first through zalando problem and after Spring 6 / Spring Boot 3 we have moved to the built in ProblemDetails-objects provided with Spring MVC.

We are currently using a custom built security filter for authenticating user tokens, but we wish to move to Spring Security. However we cannot find any way of enabling ProblemDetails in error-responses (For example when returning a 401) without completely writing this ourselves. Should this maybe be implemented as an option in a coming release?

gourav commented 1 year ago

Hello. I would like to work on this feature please.