public abstract class AbstractTenantFilter extends Object implements Filter
AbstractTenantFilter
provides common code for all tenant filters.Modifier and Type | Field and Description |
---|---|
protected static String |
SESSION_KEY_PREFIX_SHIRO |
protected static String |
SESSION_KEY_TENANT_ID |
protected static String |
SESSION_KEY_TENANT_MAP |
protected static String |
TENANT_COOKIE_NAME |
protected static String |
TENANT_LOGIN_PARAM |
Constructor and Description |
---|
AbstractTenantFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain) |
protected abstract void |
doFilterInternal(ServletRequest request,
ServletResponse response,
FilterChain chain) |
protected Cookie |
getCookie(HttpServletRequest request,
String name) |
protected Map<String,String> |
getTenants(boolean all) |
void |
init(FilterConfig filterConfig) |
protected static boolean |
isXHR(ServletRequest request) |
protected void |
setCookie(HttpServletRequest request,
HttpServletResponse response,
String name,
String value) |
protected static final String TENANT_COOKIE_NAME
protected static final String TENANT_LOGIN_PARAM
protected static final String SESSION_KEY_TENANT_MAP
protected static final String SESSION_KEY_TENANT_ID
protected static final String SESSION_KEY_PREFIX_SHIRO
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
ServletException
public final void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
protected abstract void doFilterInternal(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
IOException
ServletException
protected Cookie getCookie(HttpServletRequest request, String name)
protected void setCookie(HttpServletRequest request, HttpServletResponse response, String name, String value)
protected static boolean isXHR(ServletRequest request)