Файловый менеджер - Редактировать - /opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp_security/__pycache__/api.cpython-311.pyc
Назад
� ��bg� � � � d dl Z d dlZd dlmZ d dlmZmZ d dlmZ dZ dZ d� Zd� Zd � Z dd �Zd� Zd� Zd � Zdd�Z dd�Zd� ZdS )� N)�web)�AbstractIdentityPolicy�AbstractAuthorizationPolicy��wraps� aiohttp_security_identity_policy�aiohttp_security_autz_policyc � �� K � t |t � � s J |� � �|sJ �| j � t � � }|�d}t j ||�� � � |j | ||fi |��� d{V �� dS )z�Remember identity into response. The action is performed by identity_policy.remember() Usually the identity is stored in user cookies somehow but may be pushed into custom header also. N�MSecurity subsystem is not initialized, call aiohttp_security.setup(...) first��reason�text)� isinstance�str�config_dict�get�IDENTITY_KEYr �HTTPInternalServerError�remember)�request�response�identity�kwargs�identity_policyr s �e/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/aiohttp_security/api.pyr r s� � � � � �h��$�$�.�.�h�.�.�$��O�O�8��)�-�-�l�;�;�O���9�� �)��D�A�A�A�A� "�/� "�7�H�h� I� I�&� I� I�I�I�I�I�I�I�I�I�I� c � � K � | j � t � � }|�d}t j ||�� � �|� | |� � � d{V �� dS )z|Forget previously remembered identity. Usually it clears cookie or server-side storage to forget user session. Nr r )r r r r r �forget)r r r r s r r r ! sq � � � � �)�-�-�l�;�;�O���9�� �)��D�A�A�A�A� � � ��(� 3� 3�3�3�3�3�3�3�3�3�3r c � � K � | j � t � � }| j � t � � }|�|�d S |� | � � � d {V ��}|�d S |� |� � � d {V ��}|S �N)r r r �AUTZ_KEY�identify�authorized_userid)r r �autz_policyr �user_ids r r# r# 2 s� � � � ��)�-�-�l�;�;�O��%�)�)�(�3�3�K���+�"5��t�$�-�-�g�6�6�6�6�6�6�6�6�H����t��1�1�(�;�;�;�;�;�;�;�;�G��Nr c � �` K � t |t t j f� � s J |� � �|sJ �| j � t � � }| j � t � � }|�|�dS |� | � � � d {V ��}|� |||� � � d {V ��}|S )NT) r r �enum�Enumr r r r! r"