?????????? ????????? - ??????????????? - /home/agenciai/public_html/cd38d8/oauthlib.tar
???????
__pycache__/uri_validate.cpython-39.opt-1.pyc 0000644 00000007302 15125174063 0015022 0 ustar 00 a �#/d� � @ sp d Z ddlZdZdZdZde� Zde� ZdZd Z d e� Z de� Zde� Zd e� Z de� ZdZde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� Zde� ZdZde� Zd e� Z d e� Z!d!e� Z"d"e� Z#d#e� Z$d$e� Z%d%e� Z&d&e� Z'd'd(� Z(d)d*� Z)d+d,� Z*dS )-a Regex for URIs These regex are directly derived from the collected ABNF in RFC3986 (except for DIGIT, ALPHA and HEXDIG, defined by RFC2234). They should be processed with re.VERBOSE. Thanks Mark Nottingham for this code - https://gist.github.com/138549 � Nz[\x30-\x39]z[\x41-\x5A\x61-\x7A]z[\x30-\x39A-Fa-f]z %% %(HEXDIG)s %(HEXDIG)sz-(?: %(ALPHA)s | %(DIGIT)s | \- | \. | _ | ~ )z#(?: : | / | \? | \# | \[ | \] | @ )zI(?: ! | \$ | & | ' | \( | \) | \* | \+ | , | ; | = )z?(?: %(unreserved)s | %(pct_encoded)s | %(sub_delims)s | : | @ )z%(?: %(gen_delims)s | %(sub_delims)s )z5%(ALPHA)s (?: %(ALPHA)s | %(DIGIT)s | \+ | \- | \. )*z�(?: %(DIGIT)s | [\x31-\x39] %(DIGIT)s | 1 %(DIGIT)s{2} | 2 [\x30-\x34] %(DIGIT)s | 25 [\x30-\x35] ) z@%(dec_octet)s \. %(dec_octet)s \. %(dec_octet)s \. %(dec_octet)sz#([A-Fa-f0-9:]+[:$])[A-Fa-f0-9]{1,4}z;v %(HEXDIG)s+ \. (?: %(unreserved)s | %(sub_delims)s | : )+z+\[ (?: %(IPv6address)s | %(IPvFuture)s ) \]z8(?: %(unreserved)s | %(pct_encoded)s | %(sub_delims)s )*z;(?: %(unreserved)s | %(pct_encoded)s | %(sub_delims)s | : )z5(?: %(IP_literal)s | %(IPv4address)s | %(reg_name)s )z(?: %(DIGIT)s )*z.(?: %(userinfo)s @)? %(host)s (?: : %(port)s)?z %(pchar)s*z %(pchar)s+z<(?: %(unreserved)s | %(pct_encoded)s | %(sub_delims)s | @ )+z(?: / %(segment)s )*z,/ (?: %(segment_nz)s (?: / %(segment)s )* )?z&%(segment_nz_nc)s (?: / %(segment)s )*z#%(segment_nz)s (?: / %(segment)s )*� z�(?: %(path_abempty)s | %(path_absolute)s | %(path_noscheme)s | %(path_rootless)s | %(path_empty)s ) z(?: %(pchar)s | / | \? )*z�(?: (?: // %(authority)s %(path_abempty)s ) | %(path_absolute)s | %(path_rootless)s | %(path_empty)s ) z�(?: (?: // %(authority)s %(path_abempty)s ) | %(path_absolute)s | %(path_noscheme)s | %(path_empty)s ) z:%(relative_part)s (?: \? %(query)s)? (?: \# %(fragment)s)?zM^(?: %(scheme)s : %(hier_part)s (?: \? %(query)s )? (?: \# %(fragment)s )? )$z"^(?: %(URI)s | %(relative_ref)s )$z6^(?: %(scheme)s : %(hier_part)s (?: \? %(query)s )? )$c C s t �t| t j�S �N)�re�match�URI�VERBOSE�Zuri� r �9/usr/lib/python3.9/site-packages/oauthlib/uri_validate.py�is_uri� s r c C s t �t| t j�S r )r r � URI_referencer r r r r �is_uri_reference� s r c C s t �t| t j�S r )r r �absolute_URIr r r r r �is_absolute_uri� s r )+�__doc__r ZDIGITZALPHAZHEXDIG�localsZpct_encodedZ unreservedZ gen_delimsZ sub_delimsZpcharZreserved�schemeZ dec_octetZIPv4addressZIPv6addressZ IPvFutureZ IP_literalZreg_name�userinfo�host�portZ authorityZsegmentZ segment_nzZ segment_nz_ncZpath_abemptyZ path_absoluteZ path_noschemeZ path_rootlessZ path_empty�path�query�fragmentZ hier_partZ relative_partZrelative_refr r r r r r r r r r �<module> sb � � �� __pycache__/signals.cpython-39.opt-1.pyc 0000644 00000003540 15125174063 0014012 0 ustar 00 a \��`� � @ s` d Z dZzddlmZ dZW n. eyJ G dd� d�ZG dd� d�ZY n0 e� Ze�d �Zd S )z� Implements signals based on blinker if available, otherwise falls silently back to a noop. Shamelessly stolen from flask.signals: https://github.com/mitsuhiko/flask/blob/master/flask/signals.py F� )� NamespaceTc @ s e Zd Zddd�ZdS )r Nc C s t ||�S �N)�_FakeSignal��self�name�doc� r �4/usr/lib/python3.9/site-packages/oauthlib/signals.py�signal s zNamespace.signal)N)�__name__� __module__�__qualname__r r r r r r s r c @ sD e Zd ZdZd dd�Zdd� Zdd� Ze Z Z Z Z ZZ[dS ) r a If blinker is unavailable, create a fake class with the same interface that allows sending of signals but will fail with an error on anything else. Instead of doing anything on send, it will just ignore the arguments and do nothing instead. Nc C s || _ || _d S r )r �__doc__r r r r �__init__ s z_FakeSignal.__init__c O s t d��d S )NzOsignalling support is unavailable because the blinker library is not installed.)�RuntimeError)r �args�kwargsr r r �_fail s z_FakeSignal._failc O s d S r r )�a�kwr r r �<lambda> � z_FakeSignal.<lambda>)N) r r r r r r �sendZconnectZ disconnectZhas_receivers_forZ receivers_forZtemporarily_connected_toZconnected_tor r r r r s �r z scope-changedN) r Zsignals_availableZblinkerr �ImportErrorr Z_signalsr Z scope_changedr r r r �<module> s __pycache__/common.cpython-39.pyc 0000644 00000032055 15125174063 0012706 0 ustar 00 a \��`n4 � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z mZm Z ddlmZ zddlmZ ddlmZ W n* ey� ddlmZ ddlmZ Y n0 d Zd Ze�dej�Ze�d�Zd Ze�d�Zd:dd�Z dd� Zdd� Z dd� Z dd� Z!e"e�e"d�B Z#dd� Z$dd� Z%dd � Z&d!d"� Z'd#efd$d%�Z(d&d'� Z)d(d)� Z*d#efd*d+�Z+d,d-� Z,d;d/d0�Z-d1d2� Z.d<d4d5�Z/G d6d7� d7e0�Z1G d8d9� d9�Z2dS )=z| oauthlib.common ~~~~~~~~~~~~~~ This module provides data structures and utilities common to all implementations of OAuth. � N)�quote�unquote� urlencode� )� get_debug)�randbits)�SystemRandom)�getrandbitsZ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789z_ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}z&([^&;]*(?:password|token)[^=]*=)[^&;]+z&%[^0-9A-Fa-f]|%[0-9A-Fa-f][^0-9A-Fa-f]zAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-Zoauthlib� /c C s: t | t�r| �d�n| } t| |�} t | t�r6| �d�} | S �N�utf-8)� isinstance�str�encode�_quote�bytes�decode)�s�safe� r �3/usr/lib/python3.9/site-packages/oauthlib/common.pyr - s r c C s t | �} t| t�r| �d�} | S r )�_unquoter r r )r r r r r 7 s r c C s, t | �}t|�}t|t�r|S |�d�S d S r )�encode_params_utf8� _urlencoder r r )�paramsZutf8_params� urlencodedr r r r A s r c C sL g }| D ]>\}}|� t|t�r(|�d�n|t|t�r>|�d�n|f� q|S )ziEnsures that all parameters in a list of 2-element tuples are encoded to bytestrings using UTF-8 r )�appendr r r )r Zencoded�k�vr r r r J s �r c C sL g }| D ]>\}}|� t|t�r(|�d�n|t|t�r>|�d�n|f� q|S )zfEnsures that all parameters in a list of 2-element tuples are decoded to unicode using UTF-8. r )r r r r )r Zdecodedr r r r r �decode_params_utf8V s �r z=&;:%+~,*@!()/?'$c C sT | r,t | �tks,d}t|t | �t | f ��t�| �r>td��tj| dd�}t|�S )a� Decode a query string in x-www-form-urlencoded format into a sequence of two-element tuples. Unlike urlparse.parse_qsl(..., strict_parsing=True) urldecode will enforce correct formatting of the query string by validation. If validation fails a ValueError will be raised. urllib.parse_qsl will only raise errors if any of name-value pairs omits the equals sign. z�Error trying to decode a non urlencoded string. Found invalid characters: %s in the string: '%s'. Please ensure the request/response body is x-www-form-urlencoded.z%Invalid hex encoding in query string.T��keep_blank_values)�setr � ValueError�INVALID_HEX_PATTERN�search�urlparse� parse_qslr )�query�errorr r r r � urldecodee s r* c C s� t | ttf�r4zt| �}W q� ty0 d}Y q�0 njt| d�r�zt| � W n* ty` d}Y q� tyt d}Y q�0 tt | t�r�| � � n| �}t |�}nd}|S )a* Extract parameters and return them as a list of 2-tuples. Will successfully extract parameters from urlencoded query strings, dicts, or lists of 2-tuples. Empty strings/dicts/lists will return an empty list of parameters. Any other input will result in a return value of None. N�__iter__)r r r r* r# �hasattr�dict� TypeError�list�itemsr )�rawr r r r �extract_params� s r2 c C s t t td��t� �S )a� Generate pseudorandom nonce that is unlikely to repeat. Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Access Authentication spec. A random 64-bit number is appended to the epoch timestamp for both randomness and to decrease the likelihood of collisions. .. _`section 3.2.1`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-3.2.1 .. _`section 3.3`: https://tools.ietf.org/html/rfc5849#section-3.3 �@ )r r �generate_timestampr r r r �generate_nonce� s r5 c C s t tt�� ��S )aD Get seconds since epoch (UTC). Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Access Authentication spec. .. _`section 3.2.1`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-3.2.1 .. _`section 3.3`: https://tools.ietf.org/html/rfc5849#section-3.3 )r �int�timer r r r r4 � s r4 � c s$ t � �d�� �fdd�t| �D ��S )aX Generates a non-guessable OAuth token OAuth (1 and 2) does not specify the format of tokens except that they should be strings of random characters. Tokens should not be guessable and entropy when generating the random characters is important. Which is why SystemRandom is used instead of the default random.choice method. � c 3 s | ]}�� � �V qd S �N)�choice)�.0�x��charsZrandr r � <genexpr>� � z!generate_token.<locals>.<genexpr>)r �join�range��lengthr? r r>