Current File : //proc/self/root/lib/python3/dist-packages/botocore/__pycache__/signers.cpython-312.pyc |
�
P��e�w � �� � 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� Zy)� N)�create_request_object�prepare_request_dict)�OrderedDict)�UnknownClientMethodError�UnknownSignatureVersionError� UnsupportedSignatureVersionError)� ArnParser�datetime2timestamp)�fix_s3_hostc � � e Zd ZdZ d
d�Zed� � Zed� � Zed� � Zdd�Z dd�Z
d � Zd
� Z d
d�Z
e
Z dd�Zy)�
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 |� | _ y �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 �2/usr/lib/python3/dist-packages/botocore/signers.py�__init__zRequestSigner.__init__D sG � � (���)���"3���'���%���%��� &�m�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 �&