+
    ji                     :    R t ^ RIt^ RItRR R lltRR R lltR# )zw
Issue LiveKit JWT for user (participant) or agent.
Uses same key/secret as local LiveKit server. No LiveKit API call.
Nc                `    V ^8  d   QhR\         R\         R\         R\         R\         R\         /# )   api_key
api_secret	room_nameidentitymetadatareturnstr)formats   "OE:\live-kit-agent\livekit_voicebot\backend\apps\conversations\livekit_tokens.py__annotate__r   	   s8      s   s ^a kn     c                    \        \        P                  ! 4       4      pRRVRRRRRRRR/RVR	VR
VRVR,           RV /pV'       d   WFR&   \        P                  ! VVRR7      # )zFCreate a LiveKit access token for a participant (user) to join a room.videoroomroomJoinT
canPublishcanSubscribecanPublishDatasubiatnbfexpissr   HS256	algorithmQ inttimejwtencode)r   r   r   r   r   nowpayloads   &&&&&  r   create_user_tokenr'   	   s    
diik
CI$Dd
 	xsssYwG &
:: r   c          
      T    V ^8  d   QhR\         R\         R\         R\         R\         /# )r   r   r   agent_identityr   r	   r
   )r   s   "r   r   r   #   s:        	
 	r   c                    \        \        P                  ! 4       4      pRRRRRRRRRRRR	R/R
VRVRVRVR,           RV /pV'       d   W5R&   \        P                  ! VVRR7      # )z@Create a LiveKit token for an agent worker (connects to /agent).r   r   Tr    r   r   r   agentr   r   r   r   r   r   r   r   r   r    )r   r   r)   r   r%   r&   s   &&&&  r   create_agent_tokenr-   #   s     diik
CB$DdT
 	~sssYwG &
:: r   )r+   )r,   r+   )__doc__r"   r#   r'   r-    r   r   <module>r0      s!     
4 r   