public class RecaptchaAuthenticationFilter
extends org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
| Modifier and Type | Field and Description |
|---|---|
protected LoginFailuresManager |
failuresManager |
protected RecaptchaProperties |
recaptcha |
protected RecaptchaValidator |
recaptchaValidator |
SPRING_SECURITY_FORM_PASSWORD_KEY, SPRING_SECURITY_FORM_USERNAME_KEY| Constructor and Description |
|---|
RecaptchaAuthenticationFilter(RecaptchaValidator recaptchaValidator,
RecaptchaProperties recaptcha,
LoginFailuresManager failuresManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected java.lang.String |
obtainRecaptchaResponse(javax.servlet.http.HttpServletRequest request) |
void |
setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler failureHandler) |
void |
setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler) |
void |
setUsernameParameter(java.lang.String usernameParameter) |
getPasswordParameter, getUsernameParameter, obtainPassword, obtainUsername, setDetails, setPasswordParameter, setPostOnlydoFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationManager, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthenticationprotected final RecaptchaValidator recaptchaValidator
protected final RecaptchaProperties recaptcha
protected final LoginFailuresManager failuresManager
public RecaptchaAuthenticationFilter(RecaptchaValidator recaptchaValidator, RecaptchaProperties recaptcha, LoginFailuresManager failuresManager)
public org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.springframework.security.core.AuthenticationException
attemptAuthentication in class org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilterorg.springframework.security.core.AuthenticationExceptionpublic void setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler)
setAuthenticationSuccessHandler in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterpublic void setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler failureHandler)
setAuthenticationFailureHandler in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterpublic void setUsernameParameter(java.lang.String usernameParameter)
setUsernameParameter in class org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilterpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterprotected java.lang.String obtainRecaptchaResponse(javax.servlet.http.HttpServletRequest request)