I had a spring boot project that uses both spring security and swagger UI.
The Main problem is when i use Authentication in parameter of controller method like this
@PutMapping("/")
public UserRestDTo update(Authentication auth, @RequestBody UserRestDTo user) {
...
}
I got the Authentication object in the request parameter of swagger-UI like this swagger result
- first: Is this a bug in swagger?
- second: is there any security problem that can affect my project?
- third: how to remove the Authentication object from the request?
finally: thanks for the help:D.