Skip to content

Instantly share code, notes, and snippets.

@eogiles
Created June 6, 2013 17:28
Show Gist options
  • Save eogiles/5723287 to your computer and use it in GitHub Desktop.
Save eogiles/5723287 to your computer and use it in GitHub Desktop.
MockRequestHeaderAuthenticationFilter groovy class
package com.example.test.util
import org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
class MockRequestHeaderAuthenticationFilter extends RequestHeaderAuthenticationFilter {
String mockPrincipal
@Override
protected Object getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest request) {
mockPrincipal
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment