Ë
    [üàgŽ  ã                   óH   — d dl mZ d dlmZ  G d„ de«      Z G d„ de«      Zy)é    )ÚJwt)Ú	urlencodec                   óZ   ‡ — e Zd ZdZdZej                  ddfˆ fd„	Zd„ Zd„ Z	d„ Z
d	„ Zˆ xZS )
ÚClientCapabilityTokenz1A token to control permissions with Twilio ClientÚHS256i  Nc                 ó  •— t         t        | �  | j                  ||||d¬«       || _        || _        d| _        i | _        d|v r | j                  di |d   ¤Ž d|v r | j                  di |d   ¤Ž d|v r | j                  di |d   ¤Ž yy)a  
        :param str account_sid: The account sid to which this token is granted access.
        :param str auth_token: The secret key used to sign the token. Note, this auth token is not
                               visible to the user of the token.
        :param int nbf: Time in secs from epic before which this token is considered invalid.
        :param int ttl: the amount of time in seconds from generation that this token is valid for.
        :param kwargs:


        :returns: A new CapabilityToken with zero permissions
        N)Ú	algorithmÚ
secret_keyÚissuerÚnbfÚttlÚvalid_untilÚallow_client_outgoingÚallow_client_incomingÚallow_event_stream© )Úsuperr   Ú__init__Ú	ALGORITHMÚaccount_sidÚ
auth_tokenÚclient_nameÚcapabilitiesr   r   r   )Úselfr   r   r   r   r   ÚkwargsÚ	__class__s          €úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/twilio/jwt/client/__init__.pyr   zClientCapabilityToken.__init__   s¹   ø€ ô( 	Ô# TÑ3Ø—n‘nØ!ØØØØð 	4ô 	
ð 'ˆÔØ$ˆŒØˆÔØˆÔà" fÑ,Ø&ˆD×&Ñ&ÑI¨Ð0GÑ)HÒIØ" fÑ,Ø&ˆD×&Ñ&ÑI¨Ð0GÑ)HÒIØ 6Ñ)Ø#ˆD×#Ñ#ÑC fÐ-AÑ&BÓCð *ó    c                 ó~   — t        ddd|i«      }|r|j                  dt        |d¬«      «       || j                  d<   y)zÁ
        Allow the user of this token to make outgoing connections. Keyword arguments are passed
        to the application.

        :param str application_sid: Application to contact
        ÚclientÚoutgoingÚappSidÚ	appParamsT©ÚdoseqN©ÚScopeURIÚ	add_paramr   r   )r   Úapplication_sidr   Úscopes       r   r   z+ClientCapabilityToken.allow_client_outgoing4   s?   € ô ˜ :°¸/Ð/JÓKˆÙØ�O‰O˜K¬°6ÀÔ)FÔGà(-ˆ×Ñ˜*Ò%r   c                 óJ   — || _         t        ddd|i«      | j                  d<   y)z�
        Allow the user of this token to accept incoming connections.

        :param str client_name: Client name to accept calls from
        r    ÚincomingÚ
clientNameN)r   r'   r   )r   r   s     r   r   z+ClientCapabilityToken.allow_client_incomingA   s-   € ð 'ˆÔÜ(0Ø�j <°Ð"=ó)
ˆ×Ñ˜*Ò%r   c                 ó~   — t        ddddi«      }|r|j                  dt        |d¬«      «       || j                  d<   y	)
zL
        Allow the user of this token to access their event stream.
        ÚstreamÚ	subscribeÚpathz/2010-04-01/EventsÚparamsTr$   ÚeventsNr&   )r   r   r*   s      r   r   z(ClientCapabilityToken.allow_event_streamL   s@   € ô ˜ ;°Ð9MÐ0NÓOˆÙØ�O‰O˜H¤i°¸dÔ&CÔDà&+ˆ×Ñ˜(Ò#r   c                 ó"  — d| j                   v r5| j                  �)| j                   d   j                  d| j                  «       | j                   j                  «       D �cg c]  }|j	                  «       ‘Œ }}ddj                  |«      iS c c}w )Nr!   r-   r*   ú )r   r   r(   ÚvaluesÚ
to_payloadÚjoin)r   Ú	scope_uriÚ
scope_uriss      r   Ú_generate_payloadz'ClientCapabilityToken._generate_payloadV   s‹   € Ø˜×*Ñ*Ñ*¨t×/?Ñ/?Ð/KØ×Ñ˜jÑ)×3Ñ3°LÀ$×BRÑBRÔSð 59×4EÑ4E×4LÑ4LÓ4Nö
Ø'0ˆI× Ñ Õ"ð
ˆ
ð 
ð ˜Ÿ™ *Ó-Ð.Ð.ùò
s   Á B)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚGENERATEr   r   r   r   r;   Ú__classcell__)r   s   @r   r   r      s5   ø„ Ù;à€Ið �L‰LØØõ'DòR.ò	
ò,ö/r   r   c                   ó*   — e Zd ZdZdd„Zd„ Zd„ Zd„ Zy)r'   zDA single capability granted to Twilio Client and scoped to a serviceNc                 ó6   — || _         || _        |xs i | _        y ©N)ÚserviceÚ	privileger2   )r   rE   rF   r2   s       r   r   zScopeURI.__init__c   s   € ØˆŒØ"ˆŒØ’l ˆ�r   c                 ó"   — || j                   |<   y rD   )r2   )r   ÚkeyÚvalues      r   r(   zScopeURI.add_paramh   s   € Ø ˆ�‰�CÒr   c                 ó"  — | j                   rUt        | j                   j                  «       D ��cg c]	  \  }}||f‘Œ c}}«      }t        |«      }dj	                  |«      }nd}dj	                  | j
                  | j                  |«      S c c}}w )Nz?{}Ú zscope:{}:{}{})r2   ÚsortedÚitemsr   ÚformatrE   rF   )r   ÚkÚvÚsorted_paramsÚencoded_paramsÚparam_strings         r   r7   zScopeURI.to_payloadk   ss   € Ø�;Š;Ü"°t·{±{×7HÑ7HÓ7J×#K©t¨q°! Q¨¢FÓ#KÓLˆMÜ& }Ó5ˆNØ Ÿ<™<¨Ó7‰LàˆLØ×%Ñ% d§l¡l°D·N±NÀLÓQÐQùó $Ls   ¯B
c                 ó@   — dj                  | j                  «       «      S )Nz<ScopeURI {}>)rN   r7   )r   s    r   Ú__str__zScopeURI.__str__t   s   € Ø×%Ñ% d§o¡oÓ&7Ó8Ð8r   rD   )r<   r=   r>   r?   r   r(   r7   rU   r   r   r   r'   r'   `   s   „ ÙNó#ò
!òRó9r   r'   N)Ú
twilio.jwtr   Úurllib.parser   r   Úobjectr'   r   r   r   ú<module>rY      s&   ðÝ å "ôW/˜Cô W/ôt9ˆvõ 9r   