Package org.mariadb.jdbc.credential.env
Class EnvCredentialPlugin
- java.lang.Object
-
- org.mariadb.jdbc.credential.env.EnvCredentialPlugin
-
- All Implemented Interfaces:
Supplier<Credential>
,CredentialPlugin
public class EnvCredentialPlugin extends Object implements CredentialPlugin
Authentication using environment variable.default implementation use environment variable MARIADB_USER and MARIADB_PWD
example : `jdbc:mariadb://host/db?credentialType=ENV`
2 options `userKey` and `pwdKey` permits to indicate which environment variable to use.
-
-
Constructor Summary
Constructors Constructor Description EnvCredentialPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Credential
get()
CredentialPlugin
initialize(Options options, String userName, HostAddress hostAddress)
String
name()
String
type()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.credential.CredentialPlugin
defaultAuthenticationPluginType, mustUseSsl
-
-
-
-
Method Detail
-
type
public String type()
- Specified by:
type
in interfaceCredentialPlugin
-
name
public String name()
- Specified by:
name
in interfaceCredentialPlugin
-
initialize
public CredentialPlugin initialize(Options options, String userName, HostAddress hostAddress)
- Specified by:
initialize
in interfaceCredentialPlugin
-
get
public Credential get()
- Specified by:
get
in interfaceSupplier<Credential>
-
-