Class AzureMysqlAuthenticationPlugin

java.lang.Object
com.azure.identity.extensions.jdbc.mysql.AzureMysqlAuthenticationPlugin
All Implemented Interfaces:
com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>

public class AzureMysqlAuthenticationPlugin extends Object implements com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
The authentication plugin that enables authentication with Microsoft Entra ID.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor of AzureMysqlAuthenticationPlugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    void
    init(com.mysql.cj.protocol.Protocol<com.mysql.cj.protocol.a.NativePacketPayload> protocol)
     
    void
    init(com.mysql.cj.protocol.Protocol<com.mysql.cj.protocol.a.NativePacketPayload> protocol, com.mysql.cj.callback.MysqlCallbackHandler callbackHandler)
     
    boolean
     
    boolean
    nextAuthenticationStep(com.mysql.cj.protocol.a.NativePacketPayload fromServer, List<com.mysql.cj.protocol.a.NativePacketPayload> toServer)
     
    boolean
    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.
    void
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.mysql.cj.protocol.AuthenticationPlugin

    reset, setSourceOfAuthData
  • Constructor Details

    • AzureMysqlAuthenticationPlugin

      public AzureMysqlAuthenticationPlugin()
      Default constructor of AzureMysqlAuthenticationPlugin.
  • Method Details

    • destroy

      public void destroy()
      Specified by:
      destroy in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • getProtocolPluginName

      public String getProtocolPluginName()
      Specified by:
      getProtocolPluginName in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • init

      public void init(com.mysql.cj.protocol.Protocol<com.mysql.cj.protocol.a.NativePacketPayload> protocol)
      Specified by:
      init in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • init

      public void init(com.mysql.cj.protocol.Protocol<com.mysql.cj.protocol.a.NativePacketPayload> protocol, com.mysql.cj.callback.MysqlCallbackHandler callbackHandler)
      Specified by:
      init in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • isReusable

      public boolean isReusable()
      Specified by:
      isReusable in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • nextAuthenticationStep

      public boolean nextAuthenticationStep(com.mysql.cj.protocol.a.NativePacketPayload fromServer, List<com.mysql.cj.protocol.a.NativePacketPayload> toServer)
      Specified by:
      nextAuthenticationStep in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
    • requiresConfidentiality

      public boolean requiresConfidentiality()
      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.
      Specified by:
      requiresConfidentiality in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>
      Returns:
      true if secure connection is required
    • setAuthenticationParameters

      public void setAuthenticationParameters(String username, String password)
      Specified by:
      setAuthenticationParameters in interface com.mysql.cj.protocol.AuthenticationPlugin<com.mysql.cj.protocol.a.NativePacketPayload>