Package org.apache.solr.security
Class Sha256AuthenticationProvider
- java.lang.Object
-
- org.apache.solr.security.Sha256AuthenticationProvider
-
- All Implemented Interfaces:
org.apache.solr.common.SpecProvider
,BasicAuthPlugin.AuthenticationProvider
,ConfigEditablePlugin
public class Sha256AuthenticationProvider extends Object implements ConfigEditablePlugin, BasicAuthPlugin.AuthenticationProvider
-
-
Constructor Summary
Constructors Constructor Description Sha256AuthenticationProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(String username, String password)
Map<String,Object>
edit(Map<String,Object> latestConf, List<org.apache.solr.common.util.CommandOperation> commands)
Operate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException.Map<String,String>
getPromptHeaders()
static String
getSaltedHashedValue(String pwd)
org.apache.solr.common.util.ValidatingJsonMap
getSpec()
void
init(Map<String,Object> pluginConfig)
static String
sha256(String password, String saltKey)
-
-
-
Method Detail
-
init
public void init(Map<String,Object> pluginConfig)
- Specified by:
init
in interfaceBasicAuthPlugin.AuthenticationProvider
-
authenticate
public boolean authenticate(String username, String password)
- Specified by:
authenticate
in interfaceBasicAuthPlugin.AuthenticationProvider
-
getPromptHeaders
public Map<String,String> getPromptHeaders()
- Specified by:
getPromptHeaders
in interfaceBasicAuthPlugin.AuthenticationProvider
-
edit
public Map<String,Object> edit(Map<String,Object> latestConf, List<org.apache.solr.common.util.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 interfaceConfigEditablePlugin
-
getSpec
public org.apache.solr.common.util.ValidatingJsonMap getSpec()
- Specified by:
getSpec
in interfaceorg.apache.solr.common.SpecProvider
-
-