public class CustomOauth2Expersionn
extends java.lang.Object
| Constructor and Description |
|---|
CustomOauth2Expersionn(org.springframework.security.core.Authentication authentication) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
ipMatch(java.lang.String regList,
java.lang.String ipAddress)
判断某个地址,是否包含在IP白名单或黑名单
|
boolean |
isPass(org.springframework.security.core.Authentication authentication,
javax.servlet.http.HttpServletRequest request)
oauth访问过滤,包含对web用户的过滤和对客户端接口用户的过滤
|
public CustomOauth2Expersionn(org.springframework.security.core.Authentication authentication)
public boolean isPass(org.springframework.security.core.Authentication authentication,
javax.servlet.http.HttpServletRequest request)
authentication - request - public 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地址