Package org.mariadb.jdbc.plugin

## Interface CredentialPlugin

All Superinterfaces:
  `Supplier<Credential>`

All Known Implementing Classes:
  `AwsIamCredentialPlugin`, `EnvCredentialPlugin`, `PropertiesCredentialPlugin`

    public interface CredentialPlugin
    extends Supplier<Credential>

Credential plugin definition, to permit providing Credential to server

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default String` `defaultAuthenticationPluginType()` Indicate authentication plugin type to use for authentication
`default CredentialPlugin` `initialize​(Configuration conf, String userName, HostAddress hostAddress)` Permit initializing plugin if overridden
`default boolean` `mustUseSsl()` Indicate if plugin must throw an error if SSL is not enabled
`String` `type()` credential identifier

### Methods inherited from interface java.util.function.Supplier

`get`

### Method Detail

#### type

    String type()

credential identifier

Returns:
  type

#### mustUseSsl

    default boolean mustUseSsl()

Indicate if plugin must throw an error if SSL is not enabled

Returns:
  if ssl is required

#### defaultAuthenticationPluginType

    default String defaultAuthenticationPluginType()

Indicate authentication plugin type to use for authentication

Returns:
  plugin type to use for authentication, or null for default

#### initialize

    default CredentialPlugin initialize​(Configuration conf,
                                        String userName,
                                        HostAddress hostAddress)
                                 throws SQLException

Permit initializing plugin if overridden

Parameters:
  `conf` - configuration
  `userName` - user
  `hostAddress` - host information
Returns:
  credential plugin
Throws:
  `SQLException` - if any error occurs