Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/flask_apscheduler/__pycache__/auth.cpython-39.pyc
Ðазад
a t�h� � @ sd d Z ddlZddlmZ ddlmZmZ dd� ZG dd� de�Z G d d � d e �ZG dd� de�ZdS ) z$Provides classes for authentication.� N)�request)� bytes_to_wsgi� wsgi_to_bytesc C sV t j�d�} | sdS t| �} z| �dd�\}}|�� }W n tyL Y dS 0 ||fS )zV Return request's 'Authorization:' header as a two-tuple of (type, info). ZHTTP_AUTHORIZATIONN� )r �environ�getr �split�lower� ValueError)�header� auth_type� auth_info� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/flask_apscheduler/auth.py�get_authorization_header s r c s e Zd ZdZ� fdd�Z� ZS )� Authorizationzx A class to hold the authorization data. :param str auth_type: The authorization type. e.g: basic, bearer. c s t t| �jf i |�� || _d S )N)�superr �__init__r )�selfr �kwargs�� __class__r r r 2 s zAuthorization.__init__)�__name__� __module__�__qualname__�__doc__r � __classcell__r r r r r , s r c @ s e Zd ZdZdd� Zdd� ZdS )�HTTPAuthzL A base class from which all authentication classes should inherit. c C s t � �dS )z� Get the authorization header. :return Authentication: The authentication data or None if it is not present or invalid. N)�NotImplemented�r r r r �get_authorization= s zHTTPAuth.get_authorizationc C s dS )�l Return the value of `WWW-Authenticate` header in a `401 Unauthenticated` response. Nr r r r r �get_authenticate_headerD s z HTTPAuth.get_authenticate_headerN)r r r r r r"