Class UsernameSubstringPreAuthenticatedProcessingFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
-
- org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
-
- org.pentaho.platform.web.http.security.UsernameSubstringPreAuthenticatedProcessingFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationEventPublisherAware
,org.springframework.context.EnvironmentAware
,org.springframework.core.env.EnvironmentCapable
,org.springframework.web.context.ServletContextAware
public class UsernameSubstringPreAuthenticatedProcessingFilter extends org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
Specialization ofJ2eePreAuthenticatedProcessingFilter
wheregetPreAuthenticatedPrincipal(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
.- Author:
- mlowery
-
-
Field Summary
Fields Modifier and Type Field Description static String
PENTAHO_ORIG_USER_PRINCIPAL
Key under which originalHttpServletRequest.getUserPrincipal()
name is stored.
-
Constructor Summary
Constructors Constructor Description UsernameSubstringPreAuthenticatedProcessingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
getPreAuthenticatedCredentials
-
Methods inherited from class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
afterPropertiesSet, doFilter, getAuthenticationDetailsSource, principalChanged, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setCheckForPrincipalChanges, setContinueFilterChainOnUnsuccessfulAuthentication, setInvalidateSessionOnPrincipalChange, setRequiresAuthenticationRequestMatcher, setSecurityContextHolderStrategy, setSecurityContextRepository, successfulAuthentication, unsuccessfulAuthentication
-
-
-
-
Field Detail
-
PENTAHO_ORIG_USER_PRINCIPAL
public static final String PENTAHO_ORIG_USER_PRINCIPAL
Key under which originalHttpServletRequest.getUserPrincipal()
name is stored.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPreAuthenticatedPrincipal
protected Object getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest httpRequest)
- Overrides:
getPreAuthenticatedPrincipal
in classorg.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter
-
setRegex
public void setRegex(String regex)
Regular expression where the first capture group will be extracted and used as the username. Set tonull
or empty string to disable matching and extraction.Example:
.+\\(.+)
USER
fromDOMAIN\USER
.
-
-