public class ValidateCodeFilter extends SecurityRequestFilter implements org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
ValidateCodeFilter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addUrlTpMap(String urlString,
CodeType validateCodeType)
将系统需要校验验证码的URL根据校验的类型放入map中
|
void |
afterPropertiesSet() |
void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
用于标明将该过滤器实例配置到spring security过滤器的那个点上
|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain) |
CodeProcessor |
getCodeProcessor() |
HandlerProcessor |
getHandlerProcessor() |
SecurityProperties |
getSecurityProperties() |
void |
setCodeProcessor(CodeProcessor codeProcessor) |
void |
setHandlerProcessor(HandlerProcessor handlerProcessor) |
void |
setSecurityProperties(SecurityProperties securityProperties) |
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
public void afterPropertiesSet() throws javax.servlet.ServletException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.web.filter.GenericFilterBean
javax.servlet.ServletException
protected void addUrlTpMap(String urlString, CodeType validateCodeType)
urlString
- 需要校验验证码的URLvalidateCodeType
- 验证码类型protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException
doFilterInternal
in class org.springframework.web.filter.OncePerRequestFilter
javax.servlet.ServletException
IOException
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
SecurityRequestFilter
configure
in class SecurityRequestFilter
http
- HttpSecurityException
- 配置时出现问题public SecurityProperties getSecurityProperties()
public void setSecurityProperties(SecurityProperties securityProperties)
public CodeProcessor getCodeProcessor()
public void setCodeProcessor(CodeProcessor codeProcessor)
public HandlerProcessor getHandlerProcessor()
public void setHandlerProcessor(HandlerProcessor handlerProcessor)
Copyright © 2021. All rights reserved.