public interface IAuthenticationManager
| 限定符和类型 | 方法和说明 |
|---|---|
NacosUser |
authenticate(javax.servlet.http.HttpServletRequest httpServletRequest)
Authentication of request, identify the user who request the resource.
|
NacosUser |
authenticate(String jwtToken)
Authentication with jwt.
|
NacosUser |
authenticate(String username,
String rawPassword)
Authentication of user with password.
|
void |
authorize(Permission permission,
NacosUser nacosUser)
Authorize if the nacosUser has the specified permission.
|
boolean |
hasGlobalAdminRole(NacosUser nacosUser)
Whether the user has the administrator role.
|
boolean |
hasGlobalAdminRole(String username)
Whether the user has the administrator role.
|
NacosUser authenticate(String username, String rawPassword) throws AccessException
username - usernamerawPassword - raw passwordAccessException - if authentication is failedNacosUser authenticate(String jwtToken) throws AccessException
jwtToken - json web tokenAccessException - if authentication is failedNacosUser authenticate(javax.servlet.http.HttpServletRequest httpServletRequest) throws AccessException
httpServletRequest - http servlet requestAccessException - if authentication is failedvoid authorize(Permission permission, NacosUser nacosUser) throws AccessException
permission - permission to authnacosUser - nacosUser who wants to access the resource.AccessException - if authorization is failedboolean hasGlobalAdminRole(String username)
username - nacos user nameboolean hasGlobalAdminRole(NacosUser nacosUser)
nacosUser - nacos user nameCopyright © 2018–2023 Alibaba Group. All rights reserved.