HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/oauthlib/oauth1/rfc5849/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/oauthlib/oauth1/rfc5849/__pycache__/utils.cpython-311.pyc
�

&�`5
��T�dZddlmZddlmZmZdZd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�ZdS)zn
oauthlib.utils
~~~~~~~~~~~~~~

This module contains utility methods used by various parts of the OAuth
spec.
�N)�quote�unquote�>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c�*���fd�}�j|_|S)z�Decorator which filters params to remove non-oauth_* parameters

    Assumes the decorated method takes a params dict or list of tuples as its
    first argument.
    c�:��t|��}�|g|�Ri|��S)N)�filter_oauth_params)�params�args�kwargs�targets   ��?/usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/utils.py�wrapperzfilter_params.<locals>.wrappers0���$�V�,�,���v�f�.�t�.�.�.�v�.�.�.�)�__doc__)rrs` r
�
filter_paramsrs,���/�/�/�/�/��n�G�O��Nrc	���d�}t|t��r<tt|t|���������Stt||����S)zARemoves all non oauth parameters from a dict or a list of params.c�8�|d�d��S)Nr�oauth_)�
startswith)�kvs r
�<lambda>z%filter_oauth_params.<locals>.<lambda>!s��"�Q�%�*�*�8�4�4�r)�
isinstance�dict�list�filter�items)r	�is_oauths  r
rrs\��4�4�H��&�$���.��F�8�T�&�,�,�.�.�%9�%9�:�:�;�;�;��F�8�V�,�,�-�-�-rc	��t|t��s3tdd�|t	|����z���t|d���S)z�Escape a unicode string in an OAuth-compatible fashion.

    Per `section 3.6`_ of the spec.

    .. _`section 3.6`: https://tools.ietf.org/html/rfc5849#section-3.6

    z$Only unicode objects are escapable. zGot {!r} of type {}.�~)�safe)r�str�
ValueError�format�typer��us r
�escaper'(sc���a����D��?�/�6�6�q�$�q�'�'�B�B�C�D�D�	D�������rc�h�t|t��std���t|��S)Nz%Only unicode objects are unescapable.)rr!r"rr%s r
�unescaper)8s0���a����B��@�A�A�A��1�:�:�rc�*�tj|��S)z1A unicode-safe version of urllib2.parse_keqv_list)�urllib2�parse_keqv_list)�ls r
r,r,>����"�1�%�%�%rc�*�tj|��S)z1A unicode-safe version of urllib2.parse_http_list)r+�parse_http_listr%s r
r0r0Dr.rc��d���}|dt|�������|��rjt|t|��d���}	t	t|�������S#ttf$rYnwxYwtd���)z;Parse an OAuth authorization header into a list of 2-tupleszOAuth NzMalformed authorization header)	�lower�lenrr0rr,r�
IndexErrorr")�authorization_header�auth_schemers   r
�parse_authorization_headerr7Js����.�.�"�"�K��-�S��-�-�-�.�4�4�6�6�A�A�+�N�N��� 4�S��5E�5E�5F�5F� G�H�H��	����.�.�4�4�6�6�7�7�7���J�'�	�	�	��D�	����
�5�
6�
6�6s�6-B$�$B8�7B8)r�urllib.request�requestr+�oauthlib.commonrr�UNICODE_ASCII_CHARACTER_SETrrr'r)r,r0r7�rr
�<module>r=s�����!� � � � � �*�*�*�*�*�*�*�*� ,��
���.�.�.�
�
�
� ���&�&�&�&�&�&�	7�	7�	7�	7�	7r