Class DefaultSecDispatcher
java.lang.Object
org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
- All Implemented Interfaces:
SecDispatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.sonatype.plexus.components.cipher.PlexusCipher
DefaultHandlerprotected String
Configuration fileprotected final Map<String,
PasswordDecryptor> All available dispatchersstatic final char
static final char
private static final String
static final String
static final String
Fields inherited from interface org.sonatype.plexus.components.sec.dispatcher.SecDispatcher
SYSTEM_PROPERTY_MASTER_PASSWORD, SYSTEM_PROPERTY_SERVER_PASSWORD
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSecDispatcher
(org.sonatype.plexus.components.cipher.PlexusCipher _cipher) Ctor to be used in tests and other simplified cases (no decryptors and config).DefaultSecDispatcher
(org.sonatype.plexus.components.cipher.PlexusCipher _cipher, Map<String, PasswordDecryptor> _decryptors, String _configurationFile) -
Method Summary
Modifier and TypeMethodDescriptiondecrypt given encrypted stringprivate String
private SettingsSecurity
getSec()
private boolean
isEncryptedString
(String str) static void
private static boolean
propertyExists
(String[] values, String[] av) void
setConfigurationFile
(String file) private static void
show
(boolean showMaster) private String
stripAttributes
(String str) private static void
usage()
-
Field Details
-
DEFAULT_CONFIGURATION
- See Also:
-
SYSTEM_PROPERTY_SEC_LOCATION
- See Also:
-
TYPE_ATTR
- See Also:
-
ATTR_START
public static final char ATTR_START- See Also:
-
ATTR_STOP
public static final char ATTR_STOP- See Also:
-
_cipher
protected final org.sonatype.plexus.components.cipher.PlexusCipher _cipherDefaultHandler -
_decryptors
All available dispatchers -
_configurationFile
Configuration file
-
-
Constructor Details
-
DefaultSecDispatcher
@Inject public DefaultSecDispatcher(org.sonatype.plexus.components.cipher.PlexusCipher _cipher, Map<String, PasswordDecryptor> _decryptors, @Named("${_configurationFile:-~/.settings-security.xml}") String _configurationFile) -
DefaultSecDispatcher
public DefaultSecDispatcher(org.sonatype.plexus.components.cipher.PlexusCipher _cipher) Ctor to be used in tests and other simplified cases (no decryptors and config).
-
-
Method Details
-
decrypt
Description copied from interface:SecDispatcher
decrypt given encrypted string- Specified by:
decrypt
in interfaceSecDispatcher
- Returns:
- decrypted string
- Throws:
SecDispatcherException
-
strip
-
stripAttributes
-
isEncryptedString
-
getSec
- Throws:
SecDispatcherException
-
getMaster
- Throws:
SecDispatcherException
-
getConfigurationFile
-
setConfigurationFile
-
propertyExists
-
usage
private static void usage() -
main
- Throws:
Exception
-
show
- Throws:
Exception
-