类 AuthenticationFidoClient

  • 所有已实现的接口:
    AuthenticationPlugin<NativePacketPayload>

    public class AuthenticationFidoClient
    extends Object
    implements AuthenticationPlugin<NativePacketPayload>
    MySQL 'authentication_fido_client' authentication plugin. This authentication plugin requires a callback handler implemented in the client application that performs all the interactions with the authenticator device. This callback handler is injected into the driver via the connection property 'authenticationFidoCallbackHandler'.
    • 字段详细资料

      • PLUGIN_NAME

        public static String PLUGIN_NAME
    • 构造器详细资料

      • AuthenticationFidoClient

        public AuthenticationFidoClient()
    • 方法详细资料

      • init

        public void init​(Protocol<NativePacketPayload> protocol,
                         MysqlCallbackHandler callbackHandler)
        从接口复制的说明: AuthenticationPlugin
        Initializes this plugin with a direct Protocol reference and a generic MysqlCallbackHandler that can be used to pass over information back to the authentication provider. For example an authentication plugin may accept null usernames and use that information to obtain them from some external source, such as the system login.
        指定者:
        init 在接口中 AuthenticationPlugin<NativePacketPayload>
        参数:
        protocol - the protocol instance
        callbackHandler - a callback handler to provide additional information to the authentication provider
      • requiresConfidentiality

        public boolean requiresConfidentiality()
        从接口复制的说明: AuthenticationPlugin
        Does this plugin require the connection itself to be confidential (i.e. tls/ssl)...Highly recommended to return "true" for plugins that return the credentials in the clear.
        指定者:
        requiresConfidentiality 在接口中 AuthenticationPlugin<NativePacketPayload>
        返回:
        true if secure connection is required
      • setAuthenticationParameters

        public void setAuthenticationParameters​(String user,
                                                String password)
        从接口复制的说明: AuthenticationPlugin
        This method called from Connector/J before first nextAuthenticationStep call. Values of user and password parameters are passed from those in NativeAuthenticationProvider#changeUser() or NativeAuthenticationProvider#connect(). Plugin should use these values instead of values from connection properties because parent method may be a changeUser call which saves user and password into connection only after successful handshake.
        指定者:
        setAuthenticationParameters 在接口中 AuthenticationPlugin<NativePacketPayload>
        参数:
        user - user name
        password - user password
      • setSourceOfAuthData

        public void setSourceOfAuthData​(String sourceOfAuthData)
        从接口复制的说明: AuthenticationPlugin
        Connector/J uses this method to identify the source of the authentication data, as an authentication plugin name, that will be available to the next authentication step(s). The source of the authentication data in the first iteration will always be the sever-side default authentication plugin name. In the following iterations this depends on the client-side default authentication plugin or on the successive Protocol::AuthSwitchRequest that may have been received in the meantime. Authentication plugin implementation can use this information to decide if the data coming from the server is useful to them or not.
        指定者:
        setSourceOfAuthData 在接口中 AuthenticationPlugin<NativePacketPayload>
      • nextAuthenticationStep

        public boolean nextAuthenticationStep​(NativePacketPayload fromServer,
                                              List<NativePacketPayload> toServer)
        从接口复制的说明: AuthenticationPlugin
        Process authentication handshake data from server and optionally produce data to be sent back to the server. The driver will keep calling this method on each new server packet arrival until either an Exception is thrown (authentication failure, please use appropriate SQLStates) or the number of exchange iterations exceeded max limit or an OK packet is sent by server indicating that the connection has been approved. If, on return from this method, toServer is a non-empty list of buffers, then these buffers will be sent to the server in the same order and without any reads in between them. If toServer is an empty list, no data will be sent to server, driver immediately reads the next packet from server. In case of errors the method should throw Exception.
        指定者:
        nextAuthenticationStep 在接口中 AuthenticationPlugin<NativePacketPayload>
        参数:
        fromServer - a buffer containing handshake data payload from server (can be empty).
        toServer - list of buffers with data to be sent to the server (the list can be empty, but buffers in the list should contain data).
        返回:
        return value is ignored.