@ApplicationScoped public class MarmottaAccessControlFilter extends Object implements org.apache.marmotta.platform.core.api.modules.MarmottaHttpFilter
org.apache.marmotta.platform.user.filters.LMFAuthenticationFilter.
Whenever an HTTP request is received, the filter runs through the configured security constraints and checks
whether one of the constraints matches. In case the constraint is a permission, the execution proceeds. In
case the constraint is a restriction, an AccessDeniedException is thrown, which is then handled by
the LMFAuthenticationFilter.
org.apache.marmotta.platform.user.filters.LMFAuthenticationFilter,
SecurityService,
SecurityServiceImpl,
Author: Sebastian Schaffert| Constructor and Description |
|---|
MarmottaAccessControlFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Called by the web container to indicate to a filter that it is being taken out of service.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
The
doFilter method of the Filter is called by the container
each time a request/response pair is passed through the chain due
to a client request for a resource at the end of the chain. |
String |
getPattern()
Return the pattern (regular expression) that a request URI (relative to the LMF base URI) has to match
before triggering this filter.
|
int |
getPriority()
Return the priority of the filter.
|
void |
init(javax.servlet.FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed into
service.
|
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic String getPattern()
getPattern in interface org.apache.marmotta.platform.core.api.modules.MarmottaHttpFilterpublic int getPriority()
getPriority in interface org.apache.marmotta.platform.core.api.modules.MarmottaHttpFilterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter method of the Filter is called by the container
each time a request/response pair is passed through the chain due
to a client request for a resource at the end of the chain. The FilterChain passed in to this
method allows the Filter to pass on the request and response to the next entity in the
chain.
A typical implementation of this method would follow the following pattern:-
1. Examine the request
2. Optionally wrap the request object with a custom implementation to
filter content or headers for input filtering
3. Optionally wrap the response object with a custom implementation to
filter content or headers for output filtering
4. a) Either invoke the next entity in the chain using the FilterChain object (chain.doFilter()),
* 4. b) or not pass on the request/response pair to the next entity in the filter chain to block the request processing
* 5. Directly set headers on the response after invocation of the next entity in the filter chain.
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.FilterCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.