
    i              	           d Z ddlZddlmZ ddlmZmZ ddlmZm	Z	 ddl
m
Z
 ddlmZ d	Z ed
d      	 ddedee   dee   fd       Zy)z5Implementing support for MySQL Authentication Plugins    N)	lru_cache)OptionalType   )NotSupportedErrorProgrammingError)logger)BaseAuthPluginzmysql.connector.plugins
   F)maxsizetypedplugin_nameauth_plugin_classreturnc                    t         }| r	 t        j                  d|       t        j                  d|        t        j                  d|  |      }|rt        ||      s|j                  }t        j                  d|       t        ||      S t        d|  d	      # t        $ r }t        j                  d|       Y d}~3d}~wt        $ r}t        d|       |d}~ww xY w)
a  Return authentication class based on plugin name

    This function returns the class for the authentication plugin plugin_name.
    The returned class is a subclass of BaseAuthPlugin.

    Args:
        plugin_name (str): Authentication plugin name.
        auth_plugin_class (str): Authentication plugin class name.

    Raises:
        NotSupportedError: When plugin_name is not supported.

    Returns:
        Subclass of `BaseAuthPlugin`.
    zpackage: %szplugin_name: %s.zAUTHENTICATION_PLUGIN_CLASS: %sz"Requested Module was not found: %sNzInvalid module name: zAuthentication plugin 'z' is not supported)DEFAULT_PLUGINS_PKGr	   info	importlibimport_modulehasattrAUTHENTICATION_PLUGIN_CLASSgetattrModuleNotFoundErrorwarning
ValueErrorr   r   )r   r   packageplugin_moduleerrs        p/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/mysql/connector/authentication.pyget_auth_pluginr!   +   s    ( "G	KKKw/KK);7%33a}4EwOM$GMCT,U$1$M$M!KK9;LM=*;<<
 5k]BTU
VV	 # 	FNN?EE 	K"%:3%#@AsJ	Ks$   B B 	C#B>>C
CC)N)__doc__r   	functoolsr   typingr   r   errorsr   r   r	   pluginsr
   r   strr!        r    <module>r*      sj   : <   ! 7  #/  2U# (,!W!W}!W 
.!W $!Wr)   