File: //opt/alt/python311/lib/python3.11/site-packages/botocore/__pycache__/signers.cpython-311.pyc
�
/�;f�x � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m
Z
d dlmZm
Z
mZ d dlmZmZ d dlmZ G d� d� � Z G d � d
� � Zd� Zdd�Z G d
� d� � Zd� Z dd�Zd� Z dd�Zd� ZdS )� N)�create_request_object�prepare_request_dict)�OrderedDict)�UnknownClientMethodError�UnknownSignatureVersionError� UnsupportedSignatureVersionError)� ArnParser�datetime2timestamp)�fix_s3_hostc � � e Zd ZdZ dd�Zed� � � Zed� � � Zed� � � Zdd�Z dd �Z
d
� Zd� Z dd�Z
e
Z dd�ZdS )�
RequestSignera0
An object to sign requests before they go out over the wire using
one of the authentication mechanisms defined in ``auth.py``. This
class fires two events scoped to a service and operation name:
* choose-signer: Allows overriding the auth signer name.
* before-sign: Allows mutating the request before signing.
Together these events allow for customization of the request
signing pipeline, including overrides, request path manipulation,
and disabling signing per operation.
:type service_id: botocore.model.ServiceId
:param service_id: The service id for the service, e.g. ``S3``
:type region_name: string
:param region_name: Name of the service region, e.g. ``us-east-1``
:type signing_name: string
:param signing_name: Service signing name. This is usually the
same as the service name, but can differ. E.g.
``emr`` vs. ``elasticmapreduce``.
:type signature_version: string
:param signature_version: Signature name like ``v4``.
:type credentials: :py:class:`~botocore.credentials.Credentials`
:param credentials: User credentials with which to sign requests.
:type event_emitter: :py:class:`~botocore.hooks.BaseEventHooks`
:param event_emitter: Extension mechanism to fire events.
Nc � � || _ || _ || _ || _ || _ || _ t
j |� � | _ d S �N) �_region_name�
_signing_name�_signature_version�_credentials�_auth_token�_service_id�weakref�proxy�_event_emitter)�self�
service_id�region_name�signing_name�signature_version�credentials�
event_emitter�
auth_tokens �C/opt/alt/python311/lib/python3.11/site-packages/botocore/signers.py�__init__zRequestSigner.__init__D sN � � (���)���"3���'���%���%��� &�m�M�:�:����� c � � | j S r )r �r s r! r zRequestSigner.region_nameX s � �� � r# c � � | j S r )r r% s r! r zRequestSigner.signature_version\ s � ��&�&r# c � � | j S r )r r% s r! r zRequestSigner.signing_name` s � ��!�!r# c �. � | � ||� � S r )�sign)r �operation_name�request�kwargss r! �handlerzRequestSigner.handlerd s � �
�y�y���1�1�1r# �standardc �N � |}|�| j }|�| j }| � |||j � � }| j � d� | j � � � |� � ||| j || |�� � |t j
k �r|||d�} |�|| d<