Change security-context for method call with spring-security

Viewed 3486

Currently I'm using spring security and @PreAuthorize annotations to secure method calls. Now I want to change the authentication token for a method call like the run-as authentication replacement of spring security allows me to do.

Can I configure the replacement on a per method base? Per annotation, SpEL expression.... If not, would it be possible do figure out in the runAsManager what method is called? How would I configure the security config attributes for a secured object, at all?

2 Answers
Related