Ë
    tPêj  ã                   óJ   — d dl mZ d dlmZ d dlmZ d dlmZ  G d„ de«      Zy)é    )ÚFinal)ÚRequest)ÚOpenID)ÚCustomLoggerc                   ó    — e Zd ZdZdedefd„Zy)ÚCustomSSOLoginHandlerzø
    Custom logger for the UI SSO sign in

    Use this to parse the request headers and return a OpenID object

    Useful when you have an OAuth proxy in front of LiteLLM
    and you want to use the headers from the proxy to sign in the user
    ÚrequestÚreturnc           	   ƒ   óÂ   K  — ddl m} ddlm}  |||d¬«       t	        |j
                  «      }t        |j                  d«      |j                  d«      dddd	d
¬«      S ­w)Nr   )Úrequire_trusted_proxy_request)Úgeneral_settingszCustom UI SSO)r	   r   Úfeature_namezx-litellm-user-idzx-litellm-user-emailÚTestzhttps://test.com/test.pngÚtest)ÚidÚemailÚ
first_nameÚ	last_nameÚdisplay_nameÚpictureÚprovider)Ú&litellm.proxy.auth.trusted_proxy_utilsr   Úlitellm.proxy.proxy_serverr   ÚdictÚheadersr   Úget)Úselfr	   r   r   Úrequest_headers_dicts        úl/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/integrations/custom_sso_handler.pyÚhandle_custom_ui_sso_sign_inz2CustomSSOLoginHandler.handle_custom_ui_sso_sign_in   sm   è ø€ õ	
õ 	@á%ØØ-Ø(õ	
ô '+¨7¯?©?Ó&;ÐÜØ#×'Ñ'Ð(;Ó<Ø&×*Ñ*Ð+AÓBØØØØ/Øô
ð 	
ùs   ‚AAN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    © ó    r   r   r   	   s   „ ñð
àð
ð 
ô
r&   r   N)	Útypingr   Úfastapir   Úfastapi_sso.sso.baser   Ú"litellm.integrations.custom_loggerr   r   r%   r&   r   ú<module>r+      s   ðÝ å Ý 'å ;ô"
˜Lõ "
r&   