类 AbstractAuthenticationManager
java.lang.Object
com.alibaba.nacos.plugin.auth.impl.authenticate.AbstractAuthenticationManager
- 所有已实现的接口:
IAuthenticationManager
AbstractAuthenticationManager.
- 作者:
- Weizhan▪Yun
-
字段概要
字段修饰符和类型字段说明protected TokenManagerDelegateprotected NacosRoleServiceprivate static final Stringprotected NacosUserService -
构造器概要
构造器构造器说明AbstractAuthenticationManager(NacosUserService userDetailsService, TokenManagerDelegate jwtTokenManager, NacosRoleService roleService) -
方法概要
修饰符和类型方法说明authenticate(jakarta.servlet.http.HttpServletRequest httpServletRequest) Authentication of request, identify the user who request the resource.authenticate(String token) Authentication with jwt.authenticate(String username, String rawPassword) Authentication of user with password.voidauthorize(Permission permission, NacosUser nacosUser) Authorize if the nacosUser has the specified permission.booleanWhether the user exist the administrator role.booleanhasGlobalAdminRole(NacosUser nacosUser) Whether the user has the administrator role.booleanhasGlobalAdminRole(String username) Whether the user has the administrator role.private StringresolveToken(jakarta.servlet.http.HttpServletRequest request)
-
字段详细资料
-
USER_NOT_FOUND_MESSAGE
- 另请参阅:
-
userDetailsService
-
jwtTokenManager
-
roleService
-
-
构造器详细资料
-
AbstractAuthenticationManager
public AbstractAuthenticationManager(NacosUserService userDetailsService, TokenManagerDelegate jwtTokenManager, NacosRoleService roleService)
-
-
方法详细资料
-
authenticate
从接口复制的说明:IAuthenticationManagerAuthentication of user with password.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
username- usernamerawPassword- raw password- 返回:
- user related to this request, null if no user info is found.
- 抛出:
AccessException- if authentication is failed
-
authenticate
从接口复制的说明:IAuthenticationManagerAuthentication with jwt.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
token- json web token- 返回:
- nacos user
- 抛出:
AccessException- if authentication is failed
-
authenticate
public NacosUser authenticate(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws AccessException 从接口复制的说明:IAuthenticationManagerAuthentication of request, identify the user who request the resource.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
httpServletRequest- http servlet request- 返回:
- nacos user
- 抛出:
AccessException- if authentication is failed
-
authorize
从接口复制的说明:IAuthenticationManagerAuthorize if the nacosUser has the specified permission.- 指定者:
authorize在接口中IAuthenticationManager- 参数:
permission- permission to authnacosUser- nacosUser who wants to access the resource.- 抛出:
AccessException- if authorization is failed
-
resolveToken
-
hasGlobalAdminRole
从接口复制的说明:IAuthenticationManagerWhether the user has the administrator role.- 指定者:
hasGlobalAdminRole在接口中IAuthenticationManager- 参数:
username- nacos user name- 返回:
- if the user has the administrator role.
-
hasGlobalAdminRole
public boolean hasGlobalAdminRole()从接口复制的说明:IAuthenticationManagerWhether the user exist the administrator role.- 指定者:
hasGlobalAdminRole在接口中IAuthenticationManager- 返回:
- if the user exist the administrator role.
-
hasGlobalAdminRole
从接口复制的说明:IAuthenticationManagerWhether the user has the administrator role.- 指定者:
hasGlobalAdminRole在接口中IAuthenticationManager- 参数:
nacosUser- nacos user name- 返回:
- if the user has the administrator role.
-