Class AuthenticationProviderHolder
java.lang.Object
org.mariadb.jdbc.internal.protocol.authentication.AuthenticationProviderHolder
Provider to handle plugin authentication. This can allow library users to override our default
Authentication provider.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Provider to handle authentication. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static AuthenticationProviderHolder.AuthenticationProvider
static final AuthenticationProviderHolder.AuthenticationProvider
The default provider will construct a new pool on every request. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the currently setAuthenticationProviderHolder.AuthenticationProvider
from set invocations viasetAuthenticationProvider(AuthenticationProvider)
.static void
Change the current set authentication provider.
-
Field Details
-
DEFAULT_PROVIDER
The default provider will construct a new pool on every request. -
currentProvider
-
-
Constructor Details
-
AuthenticationProviderHolder
public AuthenticationProviderHolder()
-
-
Method Details
-
getAuthenticationProvider
Get the currently setAuthenticationProviderHolder.AuthenticationProvider
from set invocations viasetAuthenticationProvider(AuthenticationProvider)
. If none has been set a default provider will be provided (never anull
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 togetAuthenticationProvider()
.- Parameters:
newProvider
- New provider to use, ornull
to use the default provider
-