summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2017-10-27 13:19:01 +0200
committerBjørn Christian Seime <bjorncs@oath.com>2017-10-27 13:19:01 +0200
commit8fc4a7ca911ea9191d9cb4b3ec58aa7030f40a51 (patch)
treecb3ec29854e8efc16ccdc43023dd139bae5fd36e
parent9cdfac9530b95bb1164e3e14f878aba494dd3e8b (diff)
Support versioned secrets in SecretStore
-rw-r--r--jdisc_http_service/src/main/java/com/yahoo/jdisc/http/SecretStore.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/SecretStore.java b/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/SecretStore.java
index 863b1eb1c58..94b4a05cae4 100644
--- a/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/SecretStore.java
+++ b/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/SecretStore.java
@@ -6,10 +6,16 @@ package com.yahoo.jdisc.http;
* Implementations can be plugged in to provide passwords for various keys.
*
* @author bratseth
+ * @author bjorncs
*/
public interface SecretStore {
/** Returns the secret for this key */
String getSecret(String key);
+ /** Returns the secret for this key and version */
+ default String getSecret(String key, int version) {
+ throw new UnsupportedOperationException("SecretStore implementation does not support versioned secrets");
+ }
+
}