@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class CredentialProvider extends Object
CredentialProvider implementations must be thread safe.| Modifier and Type | Class and Description |
|---|---|
static class |
CredentialProvider.CredentialEntry
The combination of both the alias and the actual credential value.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CLEAR_TEXT_FALLBACK |
| Constructor and Description |
|---|
CredentialProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract CredentialProvider.CredentialEntry |
createCredentialEntry(String name,
char[] credential)
Create a new credential.
|
abstract void |
deleteCredentialEntry(String name)
Delete the given credential.
|
abstract void |
flush()
Ensures that any changes to the credentials are written to persistent
store.
|
abstract List<String> |
getAliases()
Get the aliases for all credentials.
|
abstract CredentialProvider.CredentialEntry |
getCredentialEntry(String alias)
Get the credential entry for a specific alias.
|
boolean |
isTransient()
Indicates whether this provider represents a store
that is intended for transient use - such as the UserProvider
is.
|
boolean |
needsPassword()
Does this provider require a password? This means that a password is
required for normal operation, and it has not been found through normal
means.
|
String |
noPasswordError()
If a password for the provider is needed, but is not provided, this will
return an error message and instructions for supplying said password to
the provider.
|
String |
noPasswordWarning()
If a password for the provider is needed, but is not provided, this will
return a warning and instructions for supplying said password to the
provider.
|
public static final String CLEAR_TEXT_FALLBACK
public boolean isTransient()
public abstract void flush()
throws IOException
IOExceptionpublic abstract CredentialProvider.CredentialEntry getCredentialEntry(String alias) throws IOException
alias - the name of a specific credentialIOExceptionpublic abstract List<String> getAliases() throws IOException
IOExceptionpublic abstract CredentialProvider.CredentialEntry createCredentialEntry(String name, char[] credential) throws IOException
name - the alias of the credentialcredential - the credential value for the alias.IOExceptionpublic abstract void deleteCredentialEntry(String name) throws IOException
name - the alias of the credential to deleteIOExceptionpublic boolean needsPassword()
throws IOException
IOExceptionpublic String noPasswordWarning()
public String noPasswordError()
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.