类 SecurityUtils
java.lang.Object
cn.herodotus.engine.oauth2.core.utils.SecurityUtils
- 作者:
- gengwei.zheng
- Date:
- 2018-3-8
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Stringstatic org.springframework.security.core.Authenticationstatic Objectstatic HerodotusUser获取认证用户信息static HerodotusUserstatic org.springframework.security.core.context.SecurityContextstatic Stringstatic Stringstatic booleanstatic booleanstatic voidreloadAuthority(HerodotusUser newHerodotusUser) 当用户角色发生变化,或者用户角色对应的权限发生变化,那么就从数据库中重新查询用户相关信息static StringwellFormPrefix(String content, String prefix) static StringwellFormRolePrefix(String content) static String[]whitelistToAntMatchers(List<String> list)
-
字段详细资料
-
构造器详细资料
-
SecurityUtils
public SecurityUtils()
-
-
方法详细资料
-
getSecurityContext
public static org.springframework.security.core.context.SecurityContext getSecurityContext() -
getAuthentication
public static org.springframework.security.core.Authentication getAuthentication() -
isAuthenticated
public static boolean isAuthenticated() -
getDetails
-
reloadAuthority
当用户角色发生变化,或者用户角色对应的权限发生变化,那么就从数据库中重新查询用户相关信息- 参数:
newHerodotusUser- 从数据库中重新查询并生成的用户信息
-
getPrincipal
获取认证用户信息- 返回:
- 自定义 UserDetails
HerodotusUser
-
getUsername
-
getPrincipals
-
getUserId
-
encrypt
-
matches
-
whitelistToAntMatchers
-
wellFormRolePrefix
-
wellFormPrefix
-