类 AuthenticationNamagerDelegator
- java.lang.Object
-
- com.alibaba.nacos.plugin.auth.impl.authenticate.AuthenticationNamagerDelegator
-
- 所有已实现的接口:
IAuthenticationManager
public class AuthenticationNamagerDelegator extends java.lang.Object implements IAuthenticationManager
Authentication Proxy.- 作者:
- Weizhan▪Yun
-
-
字段概要
字段 修饰符和类型 字段 说明 private com.alibaba.nacos.auth.config.AuthConfigsauthConfigsprivate org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager>defaultAuthenticationManagerprivate org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager>ldapAuthenticatoinManager
-
构造器概要
构造器 构造器 说明 AuthenticationNamagerDelegator(org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> nacosAuthManager, org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticationProvider, com.alibaba.nacos.auth.config.AuthConfigs authConfigs)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 NacosUserauthenticate(java.lang.String jwtToken)Authentication with jwt.NacosUserauthenticate(java.lang.String username, java.lang.String password)Authentication of user with password.NacosUserauthenticate(javax.servlet.http.HttpServletRequest httpServletRequest)Authentication of request, identify the user who request the resource.voidauthorize(com.alibaba.nacos.plugin.auth.api.Permission permission, NacosUser nacosUser)Authorize if the nacosUser has the specified permission.private IAuthenticationManagergetManager()booleanhasGlobalAdminRole(NacosUser nacosUser)Whether the user has the administrator role.booleanhasGlobalAdminRole(java.lang.String username)Whether the user has the administrator role.
-
-
-
字段详细资料
-
defaultAuthenticationManager
private org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> defaultAuthenticationManager
-
ldapAuthenticatoinManager
private org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticatoinManager
-
authConfigs
private com.alibaba.nacos.auth.config.AuthConfigs authConfigs
-
-
构造器详细资料
-
AuthenticationNamagerDelegator
public AuthenticationNamagerDelegator(org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> nacosAuthManager, org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticationProvider, com.alibaba.nacos.auth.config.AuthConfigs authConfigs)
-
-
方法详细资料
-
authenticate
public NacosUser authenticate(java.lang.String username, java.lang.String password) throws com.alibaba.nacos.plugin.auth.exception.AccessException
从接口复制的说明:IAuthenticationManagerAuthentication of user with password.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
username- usernamepassword- raw password- 返回:
- user related to this request, null if no user info is found.
- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authentication is failed
-
authenticate
public NacosUser authenticate(java.lang.String jwtToken) throws com.alibaba.nacos.plugin.auth.exception.AccessException
从接口复制的说明:IAuthenticationManagerAuthentication with jwt.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
jwtToken- json web token- 返回:
- nacos user
- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authentication is failed
-
authenticate
public NacosUser authenticate(javax.servlet.http.HttpServletRequest httpServletRequest) throws com.alibaba.nacos.plugin.auth.exception.AccessException
从接口复制的说明:IAuthenticationManagerAuthentication of request, identify the user who request the resource.- 指定者:
authenticate在接口中IAuthenticationManager- 参数:
httpServletRequest- http servlet request- 返回:
- nacos user
- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authentication is failed
-
authorize
public void authorize(com.alibaba.nacos.plugin.auth.api.Permission permission, NacosUser nacosUser) throws com.alibaba.nacos.plugin.auth.exception.AccessException从接口复制的说明:IAuthenticationManagerAuthorize if the nacosUser has the specified permission.- 指定者:
authorize在接口中IAuthenticationManager- 参数:
permission- permission to authnacosUser- nacosUser who wants to access the resource.- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authorization is failed
-
hasGlobalAdminRole
public boolean hasGlobalAdminRole(java.lang.String username)
从接口复制的说明:IAuthenticationManagerWhether the user has the administrator role.- 指定者:
hasGlobalAdminRole在接口中IAuthenticationManager- 参数:
username- nacos user name- 返回:
- if the user has the administrator role.
-
hasGlobalAdminRole
public boolean hasGlobalAdminRole(NacosUser nacosUser)
从接口复制的说明:IAuthenticationManagerWhether the user has the administrator role.- 指定者:
hasGlobalAdminRole在接口中IAuthenticationManager- 参数:
nacosUser- nacos user name- 返回:
- if the user has the administrator role.
-
getManager
private IAuthenticationManager getManager()
-
-