public class SCRAMPropertiesLoginModule extends PropertiesLoader implements AuditLoginModule
PropertiesLoginModule
. It can
either store the username-password in plain text or in an encrypted/hashed form. the
main(String[])
method provides a way to prepare unencrypted data to be encrypted/hashed.PropertiesLoader.FileNameKey
debug
Constructor and Description |
---|
SCRAMPropertiesLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
boolean |
commit() |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options) |
boolean |
login() |
boolean |
logout() |
static void |
main(String[] args)
Main method that could be used to encrypt given credentials for use in properties files
|
init, load, resetUsersAndGroupsCache
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerFailureForAudit
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize
in interface LoginModule
public boolean login() throws LoginException
login
in interface LoginModule
LoginException
public boolean commit() throws LoginException
commit
in interface LoginModule
LoginException
public boolean abort() throws LoginException
abort
in interface LoginModule
LoginException
public boolean logout() throws LoginException
logout
in interface LoginModule
LoginException
public static void main(String[] args) throws GeneralSecurityException, ScramException, StringPrep.StringPrepError, IOException
args
- username password type [iterations]GeneralSecurityException
- if any security mechanism is not available on this JVMScramException
- if invalid data is suppliedStringPrep.StringPrepError
- if username can't be encoded according to SASL StringPrepIOException
- if writing as properties failedCopyright © 2021 The Apache Software Foundation. All rights reserved.