@WebFilter(filterName="ErraiLoginRedirectFilter") public class LoginRedirectFilter extends Object implements javax.servlet.Filter
Used for forcing Keycloak logins in applications that wish to allow unauthenticated access to the GWT host page. By adding this filter and a security constraint to a URL, a request to that URL will redirect to a Keycloak login. After a successful login, this filter will redirect to a path specified by the "redirectLocation" filter initParam.
The REDIRECT_PARAM_NAME
is relative to the application context.
Modifier and Type | Field and Description |
---|---|
static String |
REDIRECT_PARAM_NAME |
Constructor and Description |
---|
LoginRedirectFilter() |
public static final String REDIRECT_PARAM_NAME
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.