I have following Spring Security configuration: And following configuration is used: Now I need to do impersonation(https://datatracker.ietf.org/doc/html/rfc8693). So I need to pretend as some user. I need it because of “current user” logic inside some-app application. How can I reconfigure to achieve it ? P.S. I tried to google it but I haven’t found anything relevant. Answer RFC 8693 Token