Created
September 4, 2013 02:42
-
-
Save practice/6432218 to your computer and use it in GitHub Desktop.
From http://stackoverflow.com/questions/10395745/how-to-test-rest-in-spring-app-with-spring-security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object principal = null; // fix this | |
Object credentials = null; // fix this | |
Authentication auth = new org.springframework.security.authentication.TestingAuthenticationToken(principal, credentials); | |
SecurityContextHolder.getContext().setAuthentication(auth); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment