Class ProcessEngineAuthenticationFilter
- java.lang.Object
-
- org.camunda.bpm.extension.graphql.auth.ProcessEngineAuthenticationFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class ProcessEngineAuthenticationFilter extends Object implements javax.servlet.Filter
Servlet filter to plug in authentication.
Valid init-params:
Parameter Required Expected value "authentication-provider" yes An implementation of AuthenticationProviderno 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 Modifier and Type Field Description static StringAUTHENTICATION_PROVIDER_PARAMprotected AuthenticationProviderauthenticationProvider
-
Constructor Summary
Constructors Constructor Description ProcessEngineAuthenticationFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearAuthentication(org.camunda.bpm.engine.ProcessEngine engine)voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)protected List<String>getGroupsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)protected List<String>getTenantsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)voidinit(javax.servlet.FilterConfig filterConfig)protected voidsetAuthenticatedUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)
-
-
-
Field Detail
-
AUTHENTICATION_PROVIDER_PARAM
public static final String AUTHENTICATION_PROVIDER_PARAM
- See Also:
- Constant Field Values
-
authenticationProvider
protected AuthenticationProvider authenticationProvider
-
-
Method Detail
-
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
protected void setAuthenticatedUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)
-
getGroupsOfUser
protected List<String> getGroupsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)
-
getTenantsOfUser
protected List<String> getTenantsOfUser(org.camunda.bpm.engine.ProcessEngine engine, String userId)
-
clearAuthentication
protected void clearAuthentication(org.camunda.bpm.engine.ProcessEngine engine)
-
-