public class AuthUtil
extends java.lang.Object
构造器和说明 |
---|
AuthUtil() |
限定符和类型 | 方法和说明 |
---|---|
static AuthAdapter |
adapter()
获取鉴权适配器
|
static void |
adapterAdd(AuthAdapter adapter)
添加鉴权适配器
|
static void |
adapterRemove(AuthAdapter adapter)
移除鉴权适配器
|
static boolean |
verifyIp(java.lang.String ip)
验证是否有Ip授权
|
static boolean |
verifyLogined()
验证是否已登录
|
static boolean |
verifyPath(java.lang.String path,
java.lang.String method)
验证是否有路径授权
|
static boolean |
verifyPermissions(java.lang.String... permissions)
验证是否有权限授权
|
static boolean |
verifyPermissions(java.lang.String[] permissions,
Logical logical)
验证是否有权限授权
|
static boolean |
verifyPermissionsAnd(java.lang.String... permissions)
验证是否有权限授权(同时满足多个权限)
|
static boolean |
verifyRoles(java.lang.String... roles)
验证是否有角色授权
|
static boolean |
verifyRoles(java.lang.String[] roles,
Logical logical)
验证是否有角色授权
|
static boolean |
verifyRolesAnd(java.lang.String... roles)
验证是否有角色授权(同时满足多个角色)
|
public static AuthAdapter adapter()
public static void adapterAdd(AuthAdapter adapter)
public static void adapterRemove(AuthAdapter adapter)
public static boolean verifyIp(java.lang.String ip)
public static boolean verifyLogined()
public static boolean verifyPath(java.lang.String path, java.lang.String method)
path
- 路径method
- 请求方式public static boolean verifyPermissions(java.lang.String... permissions)
permissions
- 权限public static boolean verifyPermissionsAnd(java.lang.String... permissions)
permissions
- 权限public static boolean verifyPermissions(java.lang.String[] permissions, Logical logical)
permissions
- 权限logical
- 验证的逻辑关系public static boolean verifyRoles(java.lang.String... roles)
roles
- 角色public static boolean verifyRolesAnd(java.lang.String... roles)
roles
- 角色public static boolean verifyRoles(java.lang.String[] roles, Logical logical)
roles
- 角色logical
- 验证的逻辑关系