�
J�g� � �N � d dl Z d dlZd dlZej ej z Zdefd�Zd� ZdS )� N� c � ��� t j � � �d� ��fd�t | � � D � � � � S )N� c 3 �B �K � | ]}�� �� � V � �d S )N)�choice)�.0�_�chars�rands ���g/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/authlib/common/security.py� <genexpr>z!generate_token.<locals>.<genexpr>
s/ �� � � �=�=�!�4�;�;�u�%�%�=�=�=�=�=�=� )�random�SystemRandom�join�range)�lengthr
r s `@r �generate_tokenr sB ��� ��� � �D�
�7�7�=�=�=�=�=�u�V�}�}�=�=�=�=�=�=r c � � t j d� � rdS | � � � } | � d� � S )zCheck if the uri is over ssl.�AUTHLIB_INSECURE_TRANSPORTT)zhttps://zhttp://localhost:)�os�getenv�lower�
startswith)�uris r �is_secure_transportr
s: � � �y�-�.�.� ��t�
�)�)�+�+�C��>�>�;�<�<�<r )r �stringr �
ascii_letters�digits�UNICODE_ASCII_CHARACTER_SETr r � r r �<module>r"