public class SmsAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
Modifier and Type | Field and Description |
---|---|
static String |
METHOD
请求方法
|
static String |
MOBILE_KEY |
Constructor and Description |
---|
SmsAuthenticationFilter(String url) |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
String |
getMoblileParameter() |
protected String |
obtainUsername(javax.servlet.http.HttpServletRequest request)
Enables subclasses to override the composition of the username, such as
by including additional values and a separator.
|
protected void |
setDetails(javax.servlet.http.HttpServletRequest request,
SmsAuthenticationToken authRequest)
Provided so that subclasses may configure what is put into the
authentication request's details property.
|
void |
setMoblileParameter(String moblileParameter) |
void |
setPostOnly(boolean postOnly) |
afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthentication
public static final String MOBILE_KEY
public static final String METHOD
public SmsAuthenticationFilter(String url)
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.AbstractAuthenticationProcessingFilter
org.springframework.security.core.AuthenticationException
protected String obtainUsername(javax.servlet.http.HttpServletRequest request)
request
- so that request attributes can be retrievedAuthentication
request token to the
AuthenticationManager
protected void setDetails(javax.servlet.http.HttpServletRequest request, SmsAuthenticationToken authRequest)
request
- that an authentication request is being created forauthRequest
- the authentication request object that should have its details
setpublic void setPostOnly(boolean postOnly)
public final String getMoblileParameter()
public void setMoblileParameter(String moblileParameter)
Copyright © 2021. All rights reserved.