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.PlexusCipherDefaultHandlerprotected StringConfiguration fileprotected final Map<String, PasswordDecryptor> All available dispatchersstatic final charstatic final charprivate static final Stringstatic final Stringstatic final StringFields 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 Stringprivate SettingsSecuritygetSec()private booleanisEncryptedString(String str) static voidprivate static booleanpropertyExists(String[] values, String[] av) voidsetConfigurationFile(String file) private static voidshow(boolean showMaster) private StringstripAttributes(String str) private static voidusage()
-
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:SecDispatcherdecrypt given encrypted string- Specified by:
decryptin interfaceSecDispatcher- Parameters:
str-- 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
-