blob: 5dc624ba70985d957f5affc11f7fab74b662d36e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc.secretstore;
import java.util.List;
/**
* @author mortent
*/
public interface SecretStore {
/** Returns the secret for this key */
String getSecret(String key);
/** Returns the secret for this key and version */
String getSecret(String key, int version);
/** Lists the existing versions of this secret (nonnegative integers) */
default List<Integer> listSecretVersions(String key) {
throw new UnsupportedOperationException("Secret store does not support listing versions");
}
}
|