List of usage examples for org.apache.shiro.web.filter.authz AuthorizationFilter getUnauthorizedUrl
public String getUnauthorizedUrl()
From source file:com.centfor.frame.shiro.FrameShiroFilterFactoryBean.java
License:Apache License
private void applyUnauthorizedUrlIfNecessary(Filter filter) { String unauthorizedUrl = getUnauthorizedUrl(); if (StringUtils.hasText(unauthorizedUrl) && (filter instanceof AuthorizationFilter)) { AuthorizationFilter authzFilter = (AuthorizationFilter) filter; //only apply the unauthorizedUrl if they haven't explicitly configured one already: String existingUnauthorizedUrl = authzFilter.getUnauthorizedUrl(); if (existingUnauthorizedUrl == null) { authzFilter.setUnauthorizedUrl(unauthorizedUrl); }// w w w.ja v a2 s . com } }