# 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

Modifier and Type
Method
Description
`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 Supplier

`get`

## Method Details

### 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