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 interfaceProvider to handle authentication. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static AuthenticationProviderHolder.AuthenticationProviderstatic final AuthenticationProviderHolder.AuthenticationProviderThe default provider will construct a new pool on every request. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the currently setAuthenticationProviderHolder.AuthenticationProviderfrom set invocations viasetAuthenticationProvider(AuthenticationProvider).static voidChange 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.AuthenticationProviderfrom set invocations viasetAuthenticationProvider(AuthenticationProvider). If none has been set a default provider will be provided (never anullresult).- 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, ornullto use the default provider
-