Skip to content

Instantly share code, notes, and snippets.

@practice
Created September 4, 2013 02:42
Show Gist options
  • Save practice/6432218 to your computer and use it in GitHub Desktop.
Save practice/6432218 to your computer and use it in GitHub Desktop.
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