public class AuthenticationNamagerDelegator extends Object implements IAuthenticationManager
| 构造器和说明 |
|---|
AuthenticationNamagerDelegator(org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> nacosAuthManager,
org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticationProvider,
com.alibaba.nacos.auth.config.AuthConfigs authConfigs) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 password)
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.
|
public AuthenticationNamagerDelegator(org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> nacosAuthManager, org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticationProvider, com.alibaba.nacos.auth.config.AuthConfigs authConfigs)
public NacosUser authenticate(String username, String password) throws AccessException
IAuthenticationManagerauthenticate 在接口中 IAuthenticationManagerusername - usernamepassword - raw passwordAccessException - if authentication is failedpublic NacosUser authenticate(String jwtToken) throws AccessException
IAuthenticationManagerauthenticate 在接口中 IAuthenticationManagerjwtToken - json web tokenAccessException - if authentication is failedpublic NacosUser authenticate(javax.servlet.http.HttpServletRequest httpServletRequest) throws AccessException
IAuthenticationManagerauthenticate 在接口中 IAuthenticationManagerhttpServletRequest - http servlet requestAccessException - if authentication is failedpublic void authorize(Permission permission, NacosUser nacosUser) throws AccessException
IAuthenticationManagerauthorize 在接口中 IAuthenticationManagerpermission - permission to authnacosUser - nacosUser who wants to access the resource.AccessException - if authorization is failedpublic boolean hasGlobalAdminRole(String username)
IAuthenticationManagerhasGlobalAdminRole 在接口中 IAuthenticationManagerusername - nacos user namepublic boolean hasGlobalAdminRole(NacosUser nacosUser)
IAuthenticationManagerhasGlobalAdminRole 在接口中 IAuthenticationManagernacosUser - nacos user nameCopyright © 2018–2023 Alibaba Group. All rights reserved.