Package org.apache.solr.security
Class Sha256AuthenticationProvider
- java.lang.Object
-
- org.apache.solr.security.Sha256AuthenticationProvider
-
- All Implemented Interfaces:
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<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)
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<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 ValidatingJsonMap getSpec()
- Specified by:
getSpec
in interfaceSpecProvider
-
-