public interface PasswordProvider extends OracleResourceProvider
A provider of passwords for authentication with Oracle Database.
The
oracle.jdbc.provider.password
connection property identifies the name of a
PasswordProvider implementation. Connection properties under the
namespace of oracle.jdbc.provider.password configure any parameters
that an implementation defines. To illustrate, the connection properties
below would identify a provider named "example-provider", and configure a
parameter named "vaultId":
oracle.jdbc.provider.password=example-provider oracle.jdbc.provider.password.vaultId=9999-8888-7777
ServiceLoader locates implementations of
PasswordProvider declared by a
META-INF/services/oracle.jdbc.spi.PasswordProvider file in the
class path, or by a module-info.java file with a
"provides oracle.jdbc.spi.PasswordProvider" directive in the
module path. Typically, these files are distributed within a jar file that
contains a PasswordProvider implementation.
OracleResourceProvider.Parameter| Modifier and Type | Method and Description |
|---|---|
char[] |
getPassword(java.util.Map<OracleResourceProvider.Parameter,java.lang.CharSequence> parameterValues)
Returns a password for authentication with Oracle Database.
|
getName, getParameterschar[] getPassword(java.util.Map<OracleResourceProvider.Parameter,java.lang.CharSequence> parameterValues)
Returns a password for authentication with Oracle Database.
The parameterValues passed to this method is a Map
comprised as follows:
Parameter objects returned by an invocation of
OracleResourceProvider.getParameters() on this provider.
Map
contains the default value of that
Parameter, if any. If the parameter has no default value, then the
map does not contain an entry for that Parameter.
Map does not contain entries having null values.
parameterValues Map may contain a CharSequence
having a
security sensitive value. After this
method returns, the caller may wipe the contents of these
CharSequence values from memory. Implementations of this method
should not retain a reference to these CharSequence objects.
parameterValues - Parameters
configured by connection properties
. Not null. May be empty.java.lang.IllegalArgumentException - If the value of a parameter can not be
parsed or interpreted.java.lang.IllegalStateException - If an implementation-specific failure
prevents a resource from being provided.