Class PlainTextAuthProviderBase

    • Constructor Detail

      • PlainTextAuthProviderBase

        protected PlainTextAuthProviderBase​(@NonNull
                                            String logPrefix)
        Parameters:
        logPrefix - a string that will get prepended to the logs (this is used for discrimination when you have multiple driver instances executing in the same JVM). Built-in implementations fill this with Session.getName().
    • Method Detail

      • getCredentials

        @NonNull
        protected abstract PlainTextAuthProviderBase.Credentials getCredentials​(@NonNull
                                                                                EndPoint endPoint,
                                                                                @NonNull
                                                                                String serverAuthenticator)
        Retrieves the credentials from the underlying source.

        This is invoked every time the driver opens a new connection.

        Parameters:
        endPoint - The endpoint being contacted.
        serverAuthenticator - The authenticator class sent by the endpoint.
      • onMissingChallenge

        public void onMissingChallenge​(@NonNull
                                       EndPoint endPoint)
        Description copied from interface: AuthProvider
        What to do if the server does not send back an authentication challenge (in other words, lets the client connect without any form of authentication).

        This is suspicious because having authentication enabled on the client but not on the server is probably a configuration mistake.

        Provider implementations are free to handle this however they want; typical approaches are:

        Specified by:
        onMissingChallenge in interface AuthProvider