接口 IAuthenticationManager

所有已知实现类:
AbstractAuthenticationManager, DefaultAuthenticationManager, LdapAuthenticationManager

public interface IAuthenticationManager
Authentication interface.
作者:
Weizhan▪Yun
  • 方法详细资料

    • authenticate

      NacosUser authenticate(String username, String rawPassword) throws AccessException
      Authentication of user with password.
      参数:
      username - username
      rawPassword - raw password
      返回:
      user related to this request, null if no user info is found.
      抛出:
      AccessException - if authentication is failed
    • authenticate

      NacosUser authenticate(String jwtToken) throws AccessException
      Authentication with jwt.
      参数:
      jwtToken - json web token
      返回:
      nacos user
      抛出:
      AccessException - if authentication is failed
    • authenticate

      NacosUser authenticate(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws AccessException
      Authentication of request, identify the user who request the resource.
      参数:
      httpServletRequest - http servlet request
      返回:
      nacos user
      抛出:
      AccessException - if authentication is failed
    • authorize

      void authorize(Permission permission, NacosUser nacosUser) throws AccessException
      Authorize if the nacosUser has the specified permission.
      参数:
      permission - permission to auth
      nacosUser - nacosUser who wants to access the resource.
      抛出:
      AccessException - if authorization is failed
    • hasGlobalAdminRole

      boolean hasGlobalAdminRole(String username)
      Whether the user has the administrator role.
      参数:
      username - nacos user name
      返回:
      if the user has the administrator role.
    • hasGlobalAdminRole

      boolean hasGlobalAdminRole()
      Whether the user exist the administrator role.
      返回:
      if the user exist 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.