类 AuthenticationNamagerDelegator

    • 字段详细资料

      • 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
        从接口复制的说明: IAuthenticationManager
        Authentication of user with password.
        指定者:
        authenticate 在接口中 IAuthenticationManager
        参数:
        username - username
        password - 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
        从接口复制的说明: IAuthenticationManager
        Authentication 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
        从接口复制的说明: IAuthenticationManager
        Authentication 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
        从接口复制的说明: IAuthenticationManager
        Authorize if the nacosUser has the specified permission.
        指定者:
        authorize 在接口中 IAuthenticationManager
        参数:
        permission - permission to auth
        nacosUser - 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)
        从接口复制的说明: IAuthenticationManager
        Whether the user has the administrator role.
        指定者:
        hasGlobalAdminRole 在接口中 IAuthenticationManager
        参数:
        username - nacos user name
        返回:
        if the user has the administrator role.