java.io.Closeable, java.lang.AutoCloseable@Private public class UserProvider extends KeyProvider
| Modifier and Type | Class | Description |
|---|---|---|
static class |
UserProvider.Factory |
KeyProvider.KeyVersion, KeyProvider.Metadata, KeyProvider.Options| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
SCHEME_NAME |
DEFAULT_BITLENGTH, DEFAULT_BITLENGTH_NAME, DEFAULT_CIPHER, DEFAULT_CIPHER_NAME, JCEKS_KEY_SERIAL_FILTER, JCEKS_KEY_SERIALFILTER_DEFAULT| Modifier and Type | Method | Description |
|---|---|---|
KeyProvider.KeyVersion |
createKey(java.lang.String name,
byte[] material,
KeyProvider.Options options) |
Create a new key.
|
void |
deleteKey(java.lang.String name) |
Delete the given key.
|
void |
flush() |
Ensures that any changes to the keys are written to persistent store.
|
java.util.List<java.lang.String> |
getKeys() |
Get the key names for all keys.
|
KeyProvider.KeyVersion |
getKeyVersion(java.lang.String versionName) |
Get the key material for a specific version of the key.
|
java.util.List<KeyProvider.KeyVersion> |
getKeyVersions(java.lang.String name) |
Get the key material for all versions of a specific key name.
|
KeyProvider.Metadata |
getMetadata(java.lang.String name) |
Get metadata about the key.
|
boolean |
isTransient() |
Indicates whether this provider represents a store
that is intended for transient use - such as the UserProvider
is.
|
KeyProvider.KeyVersion |
rollNewVersion(java.lang.String name,
byte[] material) |
Roll a new version of the given key.
|
java.lang.String |
toString() |
buildVersionName, close, createKey, findProvider, generateKey, getBaseName, getConf, getCurrentKey, getKeysMetadata, invalidateCache, needsPassword, noPasswordError, noPasswordWarning, options, rollNewVersionpublic static final java.lang.String SCHEME_NAME
public boolean isTransient()
KeyProviderisTransient in class KeyProviderpublic KeyProvider.KeyVersion getKeyVersion(java.lang.String versionName) throws java.io.IOException
KeyProvidergetKeyVersion in class KeyProviderversionName - the name of a specific version of the keyjava.io.IOException - raised on errors performing I/O.public KeyProvider.Metadata getMetadata(java.lang.String name) throws java.io.IOException
KeyProvidergetMetadata in class KeyProvidername - the basename of the keyjava.io.IOException - raised on errors performing I/O.public KeyProvider.KeyVersion createKey(java.lang.String name, byte[] material, KeyProvider.Options options) throws java.io.IOException
KeyProvidercreateKey in class KeyProvidername - the base name of the keymaterial - the key material for the first version of the key.options - the options for the new key.java.io.IOException - raised on errors performing I/O.public void deleteKey(java.lang.String name)
throws java.io.IOException
KeyProviderdeleteKey in class KeyProvidername - the name of the key to deletejava.io.IOException - raised on errors performing I/O.public KeyProvider.KeyVersion rollNewVersion(java.lang.String name, byte[] material) throws java.io.IOException
KeyProviderrollNewVersion in class KeyProvidername - the basename of the keymaterial - the new key materialjava.io.IOException - raised on errors performing I/O.public java.lang.String toString()
toString in class java.lang.Objectpublic void flush()
KeyProviderflush in class KeyProviderpublic java.util.List<java.lang.String> getKeys()
throws java.io.IOException
KeyProvidergetKeys in class KeyProviderjava.io.IOException - raised on errors performing I/O.public java.util.List<KeyProvider.KeyVersion> getKeyVersions(java.lang.String name) throws java.io.IOException
KeyProvidergetKeyVersions in class KeyProvidername - the base name of the key.java.io.IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.