接口 IAuthenticationManager
-
- 所有已知实现类:
AbstractAuthenticationManager,AuthenticationNamagerDelegator,DefaultAuthenticationManager,LdapAuthenticationManager
public interface IAuthenticationManagerAuthentication interface.- 作者:
- Weizhan▪Yun
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 NacosUserauthenticate(java.lang.String jwtToken)Authentication with jwt.NacosUserauthenticate(java.lang.String username, java.lang.String rawPassword)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.booleanhasGlobalAdminRole(NacosUser nacosUser)Whether the user has the administrator role.booleanhasGlobalAdminRole(java.lang.String username)Whether the user has the administrator role.
-
-
-
方法详细资料
-
authenticate
NacosUser authenticate(java.lang.String username, java.lang.String rawPassword) throws com.alibaba.nacos.plugin.auth.exception.AccessException
Authentication of user with password.- 参数:
username- usernamerawPassword- 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
NacosUser authenticate(java.lang.String jwtToken) throws com.alibaba.nacos.plugin.auth.exception.AccessException
Authentication with jwt.- 参数:
jwtToken- json web token- 返回:
- nacos user
- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authentication is failed
-
authenticate
NacosUser authenticate(javax.servlet.http.HttpServletRequest httpServletRequest) throws com.alibaba.nacos.plugin.auth.exception.AccessException
Authentication of request, identify the user who request the resource.- 参数:
httpServletRequest- http servlet request- 返回:
- nacos user
- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authentication is failed
-
authorize
void authorize(com.alibaba.nacos.plugin.auth.api.Permission permission, NacosUser nacosUser) throws com.alibaba.nacos.plugin.auth.exception.AccessExceptionAuthorize if the nacosUser has the specified permission.- 参数:
permission- permission to authnacosUser- nacosUser who wants to access the resource.- 抛出:
com.alibaba.nacos.plugin.auth.exception.AccessException- if authorization is failed
-
hasGlobalAdminRole
boolean hasGlobalAdminRole(java.lang.String username)
Whether the user has the administrator role.- 参数:
username- nacos user name- 返回:
- if the user has the administrator role.
-
hasGlobalAdminRole
boolean hasGlobalAdminRole(NacosUser nacosUser)
Whether the user has the administrator role.- 参数:
nacosUser- nacos user name- 返回:
- if the user has the administrator role.
-
-