public class CustomBasicAuthenticationFilter
extends org.springframework.security.web.authentication.www.BasicAuthenticationFilter
| Constructor and Description |
|---|
CustomBasicAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager) |
CustomBasicAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
boolean |
checkRefreshToken(java.lang.String refreshTokenValue,
java.lang.String clientId,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore) |
static boolean |
ipMatch(java.lang.String regList,
java.lang.String ipAddress)
判断某个地址,是否包含在IP白名单或黑名单
|
void |
setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource) |
void |
setCredentialsCharset(java.lang.String credentialsCharset) |
void |
setRememberMeServices(org.springframework.security.web.authentication.RememberMeServices rememberMeServices) |
public CustomBasicAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
public CustomBasicAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.security.web.authentication.www.BasicAuthenticationFilterpublic boolean checkRefreshToken(java.lang.String refreshTokenValue,
java.lang.String clientId,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
refreshTokenValue - 刷新token值clientId - 客户端idtokenStore - 客户端存储方式public void setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
setAuthenticationDetailsSource in class org.springframework.security.web.authentication.www.BasicAuthenticationFilterpublic void setRememberMeServices(org.springframework.security.web.authentication.RememberMeServices rememberMeServices)
setRememberMeServices in class org.springframework.security.web.authentication.www.BasicAuthenticationFilterpublic void setCredentialsCharset(java.lang.String credentialsCharset)
setCredentialsCharset in class org.springframework.security.web.authentication.www.BasicAuthenticationFilterpublic static boolean ipMatch(java.lang.String regList,
java.lang.String ipAddress)
regList - ip名单,各个ip逗号分隔,ip段用/分开。
如 String regList = "192.168.100.2,192.168.10.10/12";
表示 192.168.100.2,192.168.10.10,192.168.10.11,192.168.10.12ipAddress - 需要验证的IP地址