
    <i                     N    S SK r S SKJrJr  S SKr " S S\R
                  5      rg)    N)	AwaitableCallablec                       \ rS rSrS\/ \4   \/ \\   4   -  4S jrS\4S jrS\	R                  S\	R                  4S jrS\4S jrS\	R                  S\	R                  4S	 jrS
rg)
BearerAuth   auth_token_providerc                     S U l         S U l        [        R                  " U5      (       a  Xl         g [	        U5      (       a  Xl        g [        S5      e)Nz3auth_token_provider must be a callable or awaitable)async_token
sync_tokenasyncioiscoroutinefunctioncallable
ValueError)selfr   s     X/home/james-whalen/.local/lib/python3.13/site-packages/qdrant_client/auth/bearer_auth.py__init__BearerAuth.__init__   sJ     AE48&&':;;2+,,"5 !VWW    returnc                 R    U R                   c  [        S5      eU R                  5       $ )Nz&Synchronous token provider is not set.)r   r   r   s    r   _sync_get_tokenBearerAuth._sync_get_token   s%    ??"EFF  r   requestc              #   X   #    U R                  5       nSU 3UR                  S'   Uv   g 7fNzBearer Authorization)r   headersr   r   tokens      r   sync_auth_flowBearerAuth.sync_auth_flow   s-     $$&-4UG+<(s   (*c                 x   #    U R                   b  U R                  5       I S h  vN $ U R                  5       $  N7f)N)r
   r   r   s    r   _async_get_tokenBearerAuth._async_get_token!   s7     '))+++##%% ,s   !:8:c                n   #    U R                  5       I S h  vN nSU 3UR                  S'   U7v   g  N7fr   )r$   r   r   s      r   async_auth_flowBearerAuth.async_auth_flow'   s5     ++---4UG+<( .s   535)r
   r   N)__name__
__module____qualname____firstlineno__r   strr   r   r   httpxRequestr!   r$   r'   __static_attributes__ r   r   r   r      s{    X%b#g."in:L1MMX! !
emm  
& &U]] u}} r   r   )r   typingr   r   r.   Authr   r1   r   r   <module>r4      s     & # #r   