blob: 8af1f9860bfe910c440e6a7260979dc41b01559c (
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 2018 Yahoo Holdings. 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");
}
}
|