Spring security authentication mockmvc not installed
I am writing a bunch of unit tests for some protected controllers. My controllers are looking for loggedInUser to do some things with the object viaSecurityContextHolder.getContext().getAuthentication().getPrincipal()
I am writing unit tests and wrote this to create an authenticated user:
Any ideas?
+3
source to share