1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Ë
WñúhPãó†—dZddlZddlmZddlmZmZddlmZddl    m
Z
ddl m Z dd    l m Z d
d l    mZd Zd ZGd„d e«Zy)zOpenID Authentication Plugin.éN)ÚPath)ÚAnyÚList)Úutilsé)Úerrors)Úlogger)Ú MySQLSocketé)ÚMySQLAuthPluginÚMySQLOpenIDConnectAuthPlugini(có²—eZdZUdZej
d«Zeed<e    de
fd„«Z e    de fd„«Z ede
de fd„«Zd    ed
edefd „Zd ed    ed
edefd „Zy)r zBClass implementing the MySQL OpenID Connect Authentication Plugin.r Ú_openid_capability_flagÚreturncó—y)zPlugin official name.Ú$authentication_openid_connect_client©©Úselfs úoH:\Change_password\venv_build\Lib\site-packages\mysql/connector/plugins/authentication_openid_connect_client.pyÚnamez!MySQLOpenIDConnectAuthPlugin.name4s€ð6ócó—y)z'Signals whether or not SSL is required.Trrs rÚ requires_sslz)MySQLOpenIDConnectAuthPlugin.requires_ssl9s€ðrÚtokencó–‡—|jd«}t|«dk7rytjd«Št    ˆfd„|D««S)a?Helper method used to validate OpenID Connect token
 
        The Token is represented as a JSON Web Token (JWT) consists of a
        base64-encoded header, body, and signature, separated by '.' e.g.,
        "Base64url.Base64url.Base64url". The First part of the token contains
        the header, the second part contains payload and the third part contains
        signature. These token parts should be Base64 URLSafe i.e., Token cannot
        contain characters other than a-z, A-Z, 0-9 and special characters '-', '_'.
 
        Args:
            token (str): Base64url-encoded OpenID connect token fetched from
                         the file path passed via `openid_token_file` connection
                         argument.
 
        Returns:
            bool: Signal indicating whether the token is valid or not.
        ú.éFz^[a-zA-Z0-9-_]*$c3ó^•K—|]$}t|«xr‰j|«du–—Œ&y­w)N)ÚlenÚsearch)Ú.0Ú
token_partÚurlsafe_patterns  €rú    <genexpr>zFMySQLOpenIDConnectAuthPlugin._validate_openid_token.<locals>.<genexpr>Ws5øèø€ò àôJ“ÒR O×$:Ñ$:¸:Ó$FÈdÐ$RÓRñ ùsƒ*-)Úsplitr ÚreÚcompileÚall)rÚheader_payload_sigr$s  @rÚ_validate_openid_tokenz3MySQLOpenIDConnectAuthPlugin._validate_openid_token>sNø€ð&).¯ © °CÓ(8ÐÜ Ð!Ó " aÒ 'àÜŸ*™*Ð%7Ó8ˆÜó à"4ô ó
ð    
rÚ    auth_dataÚkwargsc ó°—    |jr.|js"tj|j›d«‚|j dd«}t |«}|j«jtkDrtjd«‚|jd¬«}|j«}|j|«stjd«‚|jtjt!|««|j#«g}dj%|«S#t&t(t*t,f$r}tj.d    «|‚d}~wwxYw)
a®Prepares authentication string for the server.
        Args:
            auth_data: Authorization data.
            kwargs: Custom configuration to be passed to the auth plugin
                    when invoked.
 
        Returns:
            packet: Client's authorization response.
            The OpenID Connect authorization response follows the pattern :-
            int<1>           capability flag
            string<lenenc>   id token
 
        Raises:
            InterfaceError: If the connection is insecure or the OpenID Token is too large,
                            invalid or non-existent.
            ProgrammingError: If the OpenID Token file could not be read.
        z  requires SSLÚopenid_token_fileNz8The OpenID Connect token file size is too large (> 10KB)zutf-8)Úencodingz#The OpenID Connect Token is invalidrzCThe OpenID Connect Token File (openid_token_file) could not be read)rÚ _ssl_enabledrÚInterfaceErrorrÚgetrÚstatÚst_sizeÚOPENID_TOKEN_MAX_SIZEÚ    read_textÚstripr+rrÚlc_intr ÚencodeÚjoinÚ SyntaxErrorÚ    TypeErrorÚOSErrorÚ UnicodeErrorÚProgrammingError)rr,r-Útoken_file_pathr/Ú openid_tokenÚ auth_responseÚerrs        rrCz*MySQLOpenIDConnectAuthPlugin.auth_response]s5€ð$    à× Ò ¨×):Ò):Ü×+Ñ+¨t¯y©y¨k¸Ð,GÓHÐHð$*§:¡:Ð.AÀ4Ó#HˆOÜ&*¨?Ó&;Ð à ×%Ñ%Ó'×/Ñ/Ô2GÒGÜ×+Ñ+ØNóðð!2× ;Ñ ;ÀWР;Ó MˆLØ'×-Ñ-Ó/ˆLà×.Ñ.¨|Ô<Ü×+Ñ+Ð,QÓRÐRð×,Ñ,Ü— ‘ œS Ó.Ó/Ø×#Ñ#Ó%ð*ˆMð
—8‘8˜MÓ*Ð *øÜœY¬´Ð>ò    Ü×)Ñ)ØUóàð ûð    ús‚DD!Ä!EÄ:EÅEÚsockc ó—|j|fi|¤Ž}|€tjd«‚tjd|t |««|j |«|j«}tjd|«t|«S)a¿Handles server's `auth switch request` response.
 
        Args:
            sock: Pointer to the socket connection.
            auth_data: Plugin provided data (extracted from a packet
                       representing an `auth switch request` response).
            kwargs: Custom configuration to be passed to the auth plugin
                    when invoked. The parameters defined here will override the ones
                    defined in the auth plugin itself.
 
        Returns:
            packet: Last server's response after back-and-forth
                    communication.
 
        Raises:
            InterfaceError: If a NULL auth response is received from auth_response method.
        zGot a NULL auth responsez# request: %s size: %sz# server response packet: %s)    rCrr2r    Údebugr ÚsendÚrecvÚbytes)rrEr,r-ÚresponseÚpackets      rÚauth_switch_responsez1MySQLOpenIDConnectAuthPlugin.auth_switch_responseŽsx€ð(&4×%Ñ% iÑ:°6Ñ:ˆà Ð Ü×'Ñ'Ð(BÓCÐ Cä ‰ Ð-¨x¼¸X»ÔGØ     ‰    (Ôà—‘“ˆÜ ‰ Ð3°VÔ<äV‹}ÐrN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ    int1storerrJÚ__annotations__ÚpropertyÚstrrÚboolrÚ staticmethodr+rrCr
rMrrrr r /s±…ÙLà%4 U§_¡_°QÓ%7ИUÓ7à ð6cò6óð6ðð˜dòóððð
 cð
¨dò
óð
ð</ uð/¸ð/Àó/ðbØðØ,1ðØ=@ðà    ôr)rQr'ÚpathlibrÚtypingrrÚmysql.connectorrÚrr    Únetworkr
r ÚAUTHENTICATION_PLUGIN_CLASSr6r rrrú<module>r^s<ðñ:$ã    åßå!åÝÝ!Ýà<ÐØ!Ðô~ ?õ~r