public class UsernameSubstringPreAuthenticatedProcessingFilter
extends org.springframework.security.web.authentication.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 |
---|---|
protected Object |
getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest httpRequest) |
void |
setRegex(String regex)
Regular expression where the first capture group will be extracted and used as the username.
|
getPreAuthenticatedCredentials
afterPropertiesSet, doFilter, getAuthenticationDetailsSource, principalChanged, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setCheckForPrincipalChanges, setContinueFilterChainOnUnsuccessfulAuthentication, setInvalidateSessionOnPrincipalChange, successfulAuthentication, unsuccessfulAuthentication
public static final String PENTAHO_ORIG_USER_PRINCIPAL
HttpServletRequest.getUserPrincipal()
name is stored.public UsernameSubstringPreAuthenticatedProcessingFilter()
protected Object getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest httpRequest)
getPreAuthenticatedPrincipal
in class org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
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
.Copyright © 2018 Hitachi Vantara. All rights reserved.