org.mariadb.jdbc.internal.protocol.authentication

## Class AuthenticationProviderHolder

- java.lang.Object
- - org.mariadb.jdbc.internal.protocol.authentication.AuthenticationProviderHolder

    public class AuthenticationProviderHolder
    extends Object

Provider to handle plugin authentication. This can allow library users to override our default Authentication provider.

### Nested Class Summary

Nested Classes
`static interface` `AuthenticationProviderHolder.AuthenticationProvider` Provider to handle authentication.

### Field Summary

Fields
`static AuthenticationProviderHolder.AuthenticationProvider` `DEFAULT_PROVIDER` The default provider will construct a new pool on every request.

### Constructor Summary

Constructors
Constructor and Description
`AuthenticationProviderHolder()`

### Method Summary

All Methods Static Methods Concrete Methods
`static AuthenticationProviderHolder.AuthenticationProvider` `getAuthenticationProvider()` Get the currently set `AuthenticationProviderHolder.AuthenticationProvider` from set invocations via `setAuthenticationProvider(AuthenticationProvider)`.
`static void` `setAuthenticationProvider(AuthenticationProviderHolder.AuthenticationProvider newProvider)` Change the current set authentication provider.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_PROVIDER

    public static final AuthenticationProviderHolder.AuthenticationProvider DEFAULT_PROVIDER

The default provider will construct a new pool on every request.

### Constructor Detail

#### AuthenticationProviderHolder

    public AuthenticationProviderHolder()

### Method Detail

#### getAuthenticationProvider

    public static AuthenticationProviderHolder.AuthenticationProvider getAuthenticationProvider()

Get the currently set `AuthenticationProviderHolder.AuthenticationProvider` from set invocations via `setAuthenticationProvider(AuthenticationProvider)`. If none has been set a default provider will be provided (never a `null` result).

Returns:
  Provider to get an AuthenticationProvider

#### setAuthenticationProvider

    public static void setAuthenticationProvider(AuthenticationProviderHolder.AuthenticationProvider newProvider)

Change the current set authentication provider. This provider will be provided in future requests to `getAuthenticationProvider()`.

Parameters:
  `newProvider` - New provider to use, or `null` to use the default provider