org.riotfamily.riot.security.session
Class LoginInterceptor
java.lang.Object
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
org.riotfamily.common.web.interceptor.PathMatchingInterceptor
org.riotfamily.common.web.interceptor.OncePerRequestInterceptor
org.riotfamily.riot.security.session.AccessControlInterceptor
org.riotfamily.riot.security.session.LoginInterceptor
- All Implemented Interfaces:
- RiotRuntimeAware, ServletContextAware, HandlerInterceptor
public class LoginInterceptor
- extends AccessControlInterceptor
- implements RiotRuntimeAware
HandlerInterceptor that sends a redirect to the login URL in case the
user is not logged in.
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoginInterceptor
public LoginInterceptor()
setLoginUrl
public void setLoginUrl(String loginUrl)
setRiotRuntime
public void setRiotRuntime(RiotRuntime runtime)
- Specified by:
setRiotRuntime
in interface RiotRuntimeAware
isAuthorized
protected boolean isAuthorized(HttpServletRequest request,
HttpServletResponse response,
RiotUser user)
throws Exception
- Returns
true
if a principal is set, otherwise
false
is returned and a redirect to the login form is sent.
- Overrides:
isAuthorized
in class AccessControlInterceptor
- Throws:
Exception