Package org.apache.solr.security
Class AuthenticationPlugin
- java.lang.Object
-
- org.apache.solr.security.AuthenticationPlugin
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
BasicAuthPlugin
,HadoopAuthPlugin
,KerberosPlugin
,PKIAuthenticationPlugin
public abstract class AuthenticationPlugin extends Object implements Closeable
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTHENTICATION_PLUGIN_PROP
-
Constructor Summary
Constructors Constructor Description AuthenticationPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
closeRequest()
Cleanup any per request dataabstract boolean
doAuthenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
This method attempts to authenticate the request.abstract void
init(Map<String,Object> pluginConfig)
This is called upon loading up of a plugin, used for setting it up.
-
-
-
Field Detail
-
AUTHENTICATION_PLUGIN_PROP
public static final String AUTHENTICATION_PLUGIN_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public abstract void init(Map<String,Object> pluginConfig)
This is called upon loading up of a plugin, used for setting it up.- Parameters:
pluginConfig
- Config parameters, possibly from a ZK source
-
doAuthenticate
public abstract boolean doAuthenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws Exception
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.- Parameters:
request
- the http requestresponse
- the http responsefilterChain
- 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
-
closeRequest
public void closeRequest()
Cleanup any per request data
-
-