|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.talika.tarsis.filters.AbstractFilter org.talika.tarsis.filters.CommandFilter org.talika.tarsis.filters.security.SecurityFilter
public final class SecurityFilter
Checks if client has authorization to access requested command.
Constructor Summary | |
---|---|
SecurityFilter()
|
Method Summary | |
---|---|
protected void |
checkSession(javax.servlet.ServletRequest request)
Checks if client's request has a valid security session. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
Checks if client has authorization to access requested command. |
protected User |
getUser(javax.servlet.ServletRequest request)
Retrieves user from client's request. |
void |
init(javax.servlet.FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed into service. |
Methods inherited from class org.talika.tarsis.filters.CommandFilter |
---|
destroy, findCommand, getCommandFactory |
Methods inherited from class org.talika.tarsis.filters.AbstractFilter |
---|
getContext, getFilterConfig, getLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityFilter()
Method Detail |
---|
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
int
method and storing
in a local variable authorizator instance for further use.
init
in interface javax.servlet.Filter
init
in class CommandFilter
filterConfig
- FilterConfig filter configutarion.
javax.servlet.ServletException
- if an exception has occurred that interferes with the
filter's normal operationFilter.init(FilterConfig)
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
doFilter
in class AbstractFilter
request
- ServletRequest the ServletRequest
object
that contains the client's request.response
- ServletResponse the ServletResponse
object
that contains the servlet's response.filterChain
- FilterChain invocation chain of filtered request.
java.io.IOException
- if an input or output exception occurs
javax.servlet.ServletException
- if an exception has occurred that interferes with the
filter's normal operationFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
protected void checkSession(javax.servlet.ServletRequest request) throws AuthenticationRequiredException
request
- ServletRequest the ServletRequest
object
that contains the client's request.
AuthenticationRequiredException
- if session is invalid or not exists.protected User getUser(javax.servlet.ServletRequest request)
request
- ServletRequest the ServletRequest
object
that contains the client's request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |