// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.http;

/**
 * An abstraction of a secret store for e.g passwords.
 * Implementations can be plugged in to provide passwords for various keys.
 *
 * @author bratseth
 */
public interface SecretStore {

    /** Returns the secret for this key */
    String getSecret(String key);

}

@@ -301,16 +301,35 @@
 ratseth%0A
+ * @author bjorncs%0A
  */%0Apubl
@@ -434,10 +434,242 @@
  key);%0A%0A
+    /** Returns the secret for this key and version */%0A    default String getSecret(String key, int version) %7B%0A        throw new UnsupportedOperationException(%22SecretStore implementation does not support versioned secrets%22);%0A    %7D%0A%0A
 %7D%0A

Support versioned secrets in SecretStore