Class ProcessEngineAuthenticationFilter
java.lang.Object
org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter
- All Implemented Interfaces:
javax.servlet.Filter
Servlet filter to plug in authentication.
Valid init-params:
| Parameter | Required | Expected value |
|---|---|---|
| "authentication-provider" | yes | An implementation of AuthenticationProvider |
| "rest-url-pattern-prefix" | no | The expected servlet path. Should only be set, if the underlying JAX-RS application is not deployed as a servlet (e.g. Resteasy allows deployments
as a servlet filter). Value has to match what would be the HttpServletRequest.getServletPath() if it was deployed as a servlet. |
- Author:
- Thorben Lindhauer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearAuthentication(org.camunda.bpm.engine.ProcessEngine engine) voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) protected StringextractEngineName(String requestUrl) May not return nullprotected org.camunda.bpm.engine.ProcessEnginegetAddressedEngine(String engineName) getGroupsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId) getTenantsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId) voidinit(javax.servlet.FilterConfig filterConfig) protected booleanrequiresEngineAuthentication(String requestUrl) protected voidsetAuthenticatedUser(org.camunda.bpm.engine.ProcessEngine engine, String userId, List<String> groupIds, List<String> tenantIds)
-
Field Details
-
WHITE_LISTED_URL_PATTERNS
-
ENGINE_REQUEST_URL_PATTERN
-
DEFAULT_ENGINE_NAME
- See Also:
-
AUTHENTICATION_PROVIDER_PARAM
- See Also:
-
SERVLET_PATH_PREFIX
- See Also:
-
authenticationProvider
-
servletPathPrefix
-
-
Constructor Details
-
ProcessEngineAuthenticationFilter
public ProcessEngineAuthenticationFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
setAuthenticatedUser
-
getGroupsOfUser
-
getTenantsOfUser
-
clearAuthentication
protected void clearAuthentication(org.camunda.bpm.engine.ProcessEngine engine) -
requiresEngineAuthentication
-
extractEngineName
May not return null -
getAddressedEngine
-