public interface HandlerProcessor
协助处理器
用于在各种 Handler 中根据情况相应地跳转到指定的页面或者输出json格式的数据ExceptionAuthenticationEntryPoint
,
CustomAccessDeniedHandler
,
CustomAuthenticationFailureHandler
,
CustomAuthenticationSuccessHandler
,
CustomLogoutSuccessHandler
Modifier and Type | Method and Description |
---|---|
void |
deney(PropertyResource propertyResource,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.access.AccessDeniedException exception)
访问资源时权限被拒绝
|
void |
exception(PropertyResource propertyResource,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception exception)
访问资源时因为权限等原因发生了异常后的处理
|
void |
exit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
退出成功后的处理
|
void |
failure(PropertyResource propertyResource,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception exception)
登陆失败后的处理
|
void |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication,
SecurityToken token)
登陆成功后的处理
|
void |
preAuth(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
com.yishuifengxiao.common.tool.entity.Response<com.yishuifengxiao.common.tool.exception.CustomException> data)
输出前置校验时出现的异常信息
|
void login(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication, SecurityToken token) throws IOException
request
- HttpServletRequestresponse
- HttpServletResponseauthentication
- 认证信息token
- 生成的tokenIOException
- 处理时发生问题void failure(PropertyResource propertyResource, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Exception exception) throws IOException
propertyResource
- 系统里配置的资源request
- HttpServletRequestresponse
- HttpServletResponseexception
- 失败的原因IOException
- 处理时发生问题void exit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication) throws IOException
request
- HttpServletRequestresponse
- HttpServletResponseauthentication
- 认证信息IOException
- 处理时发生问题void deney(PropertyResource propertyResource, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.access.AccessDeniedException exception) throws IOException
访问资源时权限被拒绝
本身是一个合法的用户,但是对于部分资源没有访问权限propertyResource
- 系统里配置的资源request
- HttpServletRequestresponse
- HttpServletResponseexception
- 被拒绝的原因IOException
- 处理时发生问题void exception(PropertyResource propertyResource, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Exception exception) throws IOException
访问资源时因为权限等原因发生了异常后的处理
可能本身就不是一个合法的用户propertyResource
- 系统里配置的资源request
- HttpServletRequestresponse
- HttpServletResponseexception
- 发生异常的原因IOException
- 处理时发生问题void preAuth(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, com.yishuifengxiao.common.tool.entity.Response<com.yishuifengxiao.common.tool.exception.CustomException> data) throws IOException
输出前置校验时出现的异常信息
在进行前置校验时出现了问题,一般情况下为用户名或密码错误之类的request
- HttpServletRequestresponse
- HttpServletResponsedata
- 响应信息IOException
- 处理时发生问题Copyright © 2021. All rights reserved.