aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@verizonmedia.com>2019-10-08 12:46:27 +0200
committerØyvind Grønnesby <oyving@verizonmedia.com>2019-10-08 12:46:27 +0200
commit0d9892df0aa99e13ff83bfdeb3de8f1e8305bdcd (patch)
tree71194a5b12e3b9bbb0389462fa1d4f3ee784aed5 /hosted-api
parentc4568fbebed3fe572453222892b631da97301f8e (diff)
Add "privateKey" to the Properties utility class
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java b/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
index 0ca1b3e5603..d578f937485 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
@@ -42,6 +42,10 @@ public class Properties {
return getNonBlankProperty("certificateFile").map(Paths::get);
}
+ public static Optional<String> privateKey() {
+ return getNonBlankProperty("privateKey");
+ }
+
/** Returns the system property with the given name if it is set, or empty. */
public static Optional<String> getNonBlankProperty(String name) {
return Optional.ofNullable(System.getProperty(name)).filter(value -> ! value.isBlank());