public class UsernameSubstringPreAuthenticatedProcessingFilter
extends org.springframework.security.ui.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
J2eePreAuthenticatedProcessingFilter
where
getPreAuthenticatedPrincipal(HttpServletRequest)
optionally extracts a substring of the user principal to
use as the return value.
The original user principal is stored in a request attribute named PENTAHO_ORIG_USER_PRINCIPAL
.
Modifier and Type | Field and Description |
---|---|
static String |
PENTAHO_ORIG_USER_PRINCIPAL
Key under which original
HttpServletRequest.getUserPrincipal() name is stored. |
Constructor and Description |
---|
UsernameSubstringPreAuthenticatedProcessingFilter() |
Modifier and Type | Method and Description |
---|---|
void |
setRegex(String regex)
Regular expression where the first capture group will be extracted and used as the username.
|
getOrder
afterPropertiesSet, doFilterHttp, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationManager, setContinueFilterChainOnUnsuccessfulAuthentication
public static final String PENTAHO_ORIG_USER_PRINCIPAL
HttpServletRequest.getUserPrincipal()
name is stored.public UsernameSubstringPreAuthenticatedProcessingFilter()
public void setRegex(String regex)
null
or
empty string to disable matching and extraction.
Example:
.+\\(.+)
The above example regular expression would extract USER
from DOMAIN\USER
.