Current File : //usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/__pycache__/utils.cpython-312.pyc |
�
&�`� � �^ � d Z ddlZddlZddlmZmZ ddlmZ d� Zd� Z d� Z
d� Zd � Zd
� Z
d� Zy)zp
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth 2 spec.
� N)�quote�urlparse)� urldecodec �� � t | t � s| �| S t | t t t f� r(dj | D �cg c]
}t |� �� c}� S t
d| z � �c c}w )z5Convert a list of scopes to a space separated string.� z8Invalid scope (%s), must be string, tuple, set, or list.)�
isinstance�str�set�tuple�list�join�
ValueError��scope�ss �?/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/utils.py�
list_to_scoper s[ � ��%������� �E�C���-� .��x�x��/�A��Q��/�0�0��S�V[�[�\�\�� 0s �A&c � � t | t t t f� r| D �cg c]
}t |� �� c}S | �y| j � j
d� S c c}w )z5Convert a space separated string to a list of scopes.Nr )r r r r
r �strip�splitr s r �
scope_to_listr sL � ��%�%��s�+�,� %�&�1��A��&�&� ����{�{�}�"�"�3�'�'�� 's �Ac �~ � t t t | � j � � }d|v rt |d � |d<