public class AdminContextInterceptor extends WebContextInterceptor
限定符和类型 | 字段和说明 |
---|---|
private java.lang.String |
adminContextPath |
private java.lang.String |
loginJsonUrl |
private java.lang.String |
loginUrl |
private java.lang.String[] |
needNotAuthorizedUrls |
private java.lang.String[] |
needNotLoginUrls |
private SysRoleAuthorizedService |
roleAuthorizedService |
private SysRoleService |
sysRoleService |
private java.lang.String |
unauthorizedUrl |
private org.springframework.web.util.UrlPathHelper |
urlPathHelper |
fileUploadComponent, localeChangeInterceptor, log, siteComponent, sysUserService
构造器和说明 |
---|
AdminContextInterceptor() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getAdminContextPath() |
private boolean |
ownsAllRight(java.lang.String roles) |
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object handler) |
private void |
redirectLogin(java.lang.String ctxPath,
java.lang.String path,
java.lang.String queryString,
java.lang.String requestedWith,
javax.servlet.http.HttpServletResponse response) |
void |
setAdminContextPath(java.lang.String adminContextPath) |
void |
setLoginJsonUrl(java.lang.String loginJsonUrl) |
void |
setLoginUrl(java.lang.String loginUrl) |
void |
setNeedNotAuthorizedUrls(java.lang.String[] needNotAuthorizedUrls) |
void |
setNeedNotLoginUrls(java.lang.String[] needNotLoginUrls) |
void |
setUnauthorizedUrl(java.lang.String unauthorizedUrl) |
private boolean |
verifyNeedAuthorized(java.lang.String url) |
private boolean |
verifyNeedLogin(java.lang.String url) |
initUser
private java.lang.String adminContextPath
private java.lang.String loginUrl
private java.lang.String loginJsonUrl
private java.lang.String unauthorizedUrl
private java.lang.String[] needNotLoginUrls
private java.lang.String[] needNotAuthorizedUrls
private org.springframework.web.util.UrlPathHelper urlPathHelper
private SysRoleAuthorizedService roleAuthorizedService
private SysRoleService sysRoleService
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler)
preHandle
在接口中 org.springframework.web.servlet.HandlerInterceptor
preHandle
在类中 WebContextInterceptor
private void redirectLogin(java.lang.String ctxPath, java.lang.String path, java.lang.String queryString, java.lang.String requestedWith, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
private boolean ownsAllRight(java.lang.String roles)
private boolean verifyNeedLogin(java.lang.String url)
private boolean verifyNeedAuthorized(java.lang.String url)
public void setAdminContextPath(java.lang.String adminContextPath)
adminContextPath
- the adminContextPath to setpublic java.lang.String getAdminContextPath()
public void setLoginUrl(java.lang.String loginUrl)
loginUrl
- public void setLoginJsonUrl(java.lang.String loginJsonUrl)
loginJsonUrl
- public void setUnauthorizedUrl(java.lang.String unauthorizedUrl)
unauthorizedUrl
- public void setNeedNotLoginUrls(java.lang.String[] needNotLoginUrls)
needNotLoginUrls
- public void setNeedNotAuthorizedUrls(java.lang.String[] needNotAuthorizedUrls)
needNotAuthorizedUrls
-