
    g                    j    d dl mZ d dlmZmZ d dlmZ d dlmZ erd dl	m
Z
 d dlmZ  G d de      Zy	)
    )annotations)TYPE_CHECKINGAny)FrameworkIntegration)AttrDict)Sequence)TornadoOAuthc                  6    e Zd ZddZe	 	 	 	 	 	 	 	 dd       Zy)TornadoIntegrationNc                     y)zWe do not support access token refresh, since we obtain and operate only on
        identity tokens. We override this method explicitly to implement all abstract
        methods of base class.
        N )selftokenrefresh_tokenaccess_tokens       e/var/www/openai/venv/lib/python3.12/site-packages/streamlit/web/server/authlib_tornado_integration.pyupdate_tokenzTornadoIntegration.update_token    s        c                    | j                   si S i }|D ]V  }| j                   j                  |i       j                  |d      }t        |t              r|j	                         }|R|||<   X |S )zaConfigure Authlib integration with provider parameters
        specified in secrets.toml
        N)configget
isinstancer   to_dict)oauthnameparamsprepared_configkeyvalues         r   load_configzTornadoIntegration.load_config&   so     ||ICLL$$T2.223=E%* ',$  r   )NN)r   r	   r   strr   zSequence[str]returnzdict[str, Any])__name__
__module____qualname__r   staticmethodr    r   r   r   r   r      s;     #&0=	 r   r   N)
__future__r   typingr   r    authlib.integrations.base_clientr   streamlit.runtime.secretsr   collections.abcr   streamlit.web.server.oidc_mixinr	   r   r   r   r   <module>r-      s-    # % /(<- r   