
    h                     L    S SK Jr  SSKJr  SSKJr  SSKrSSKr " S S5      rg)   )TokenVerifier    )WebhookEvent)ParseNc                   8    \ rS rSrS\4S jrS\S\S\4S jrSr	g	)
WebhookReceiver   token_verifierc                     Xl         g )N	_verifier)selfr
   s     E/var/www/html/env/lib/python3.13/site-packages/livekit/api/webhook.py__init__WebhookReceiver.__init__	   s    '    body
auth_tokenreturnc                 R   U R                   R                  U5      nUR                  c  [        S5      e[        R                  " UR                  5       5      R                  5       n[        R                  " UR                  5      nXE:w  a  [        S5      e[        U[        5       SS9$ )Nz!sha256 was not found in the tokenzhash mismatchT)ignore_unknown_fields)r   verifysha256	Exceptionhashlibencodedigestbase64	b64decoder   r   )r   r   r   claims	body_hashclaims_hashs         r   receiveWebhookReceiver.receive   s    &&z2== ?@@NN4;;=188:	&&v}}5#O,,T<>FFr   r   N)
__name__
__module____qualname____firstlineno__r   r   strr   r#   __static_attributes__ r   r   r   r      s,    (} (GC GS G\ Gr   r   )	access_tokenr   livekit.protocol.webhookr   google.protobuf.json_formatr   r   r   r   r+   r   r   <module>r/      s     ' 1 -  G Gr   