Package com.atlassian.secrets.vault.auth
Class AuthenticationConfigUtils
java.lang.Object
com.atlassian.secrets.vault.auth.AuthenticationConfigUtils
Utility class for parsing authentication values from environmental variables or system properties.
- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringparseOptionalValueFromEnv(String envVariableName, String sysPropName) Parses an optional value from environmental variables or system properties.static StringparseRequiredValueFromEnv(String envVariableName, String sysPropName) Parses a value from environmental variables or system properties.
-
Method Details
-
parseRequiredValueFromEnv
Parses a value from environmental variables or system properties. The environmental variable has a priority.- Parameters:
envVariableName- The name of the environmental variable to read from.sysPropName- The name of the system property to read from.- Returns:
- The value parsed from either the environmental variable or system property.
- Throws:
SecretStoreException- if the value is not found for the provided environmental variable and system property.
-
parseOptionalValueFromEnv
Parses an optional value from environmental variables or system properties. The environmental variable has a priority.- Parameters:
envVariableName- The name of the environmental variable to read from.sysPropName- The name of the system property to read from.- Returns:
- The value parsed from either the environmental variable or system property. If both absent return null.
-