Class BasicAuthPlugin

    • Constructor Detail

      • BasicAuthPlugin

        public BasicAuthPlugin()
    • Method Detail

      • authenticate

        public boolean authenticate​(String username,
                                    String pwd)
      • init

        public void init​(Map<String,​Object> pluginConfig)
        Description copied from class: AuthenticationPlugin
        This is called upon loading up of a plugin, used for setting it up.
        Specified by:
        init in class AuthenticationPlugin
        Parameters:
        pluginConfig - Config parameters, possibly from a ZK source
      • edit

        public Map<String,​Object> edit​(Map<String,​Object> latestConf,
                                             List<CommandOperation> commands)
        Description copied from interface: ConfigEditablePlugin
        Operate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException. return a null if no changes are to be made as a result of this edit. It is the responsibility of the implementation to ensure that the returned config is valid . The framework does no validation of the data
        Specified by:
        edit in interface ConfigEditablePlugin
      • doAuthenticate

        public boolean doAuthenticate​(javax.servlet.ServletRequest servletRequest,
                                      javax.servlet.ServletResponse servletResponse,
                                      javax.servlet.FilterChain filterChain)
                               throws Exception
        Description copied from class: AuthenticationPlugin
        This method attempts to authenticate the request. Upon a successful authentication, this must call the next filter in the filter chain and set the user principal of the request, or else, upon an error or an authentication failure, throw an exception.
        Specified by:
        doAuthenticate in class AuthenticationPlugin
        Parameters:
        servletRequest - the http request
        servletResponse - the http response
        filterChain - the servlet filter chain
        Returns:
        false if the request not be processed by Solr (not continue), i.e. the response and status code have already been sent.
        Throws:
        Exception - any exception thrown during the authentication, e.g. PrivilegedActionException
      • getBlockUnknown

        public boolean getBlockUnknown()