
    PIi	                     D    d Z ddlZddlZddlZddlZ G d de      ZdgZy)z[
The purpose of the session module is to encapsulate authentication classes and
utilities.
    Nc                   &    e Zd ZdZdZ	 	 ddZd Zy)FacebookSessiona	  
    FacebookSession manages the the Graph API authentication and https
    connection.

    Attributes:
        GRAPH (class): The graph url without an ending forward-slash.
        app_id: The application id.
        app_secret: The application secret.
        access_token: The access token.
        appsecret_proof: The application secret proof.
        proxies: Object containing proxies for 'http' and 'https'
        requests: The python requests object through which calls to the api can
            be made.
    zhttps://graph.facebook.comNc                 2   || _         || _        || _        || _        || _        || _        t        j                         | _        t        j                  j                  t        j                  j                  t              d      | j                  _        d| j                  i}|r| j                         |d<   | j                  j                  j!                  |       | j                  r0| j                  j                  j!                  | j                         yy)z
        Initializes and populates the instance attributes with app_id,
        app_secret, access_token, appsecret_proof, proxies, timeout and requests
        given arguments app_id, app_secret, access_token, proxies and timeout.
        zfb_ca_chain_bundle.crtaccess_tokenappsecret_proofN)app_id
app_secretr   proxiestimeoutdebugrequestsSessionospathjoindirname__file__verify_gen_appsecret_proofparamsupdate)selfr   r	   r   r
   r   r   r   s           g/var/www/webhook.estador.de/web/meta/bot/venv/lib/python3.12/site-packages/facebook_business/session.py__init__zFacebookSession.__init__"   s     $(
 ((*!ww||GGOOH%$ 

 D--
 (,(A(A(CF$%##F+<<MM!!((6     c                     t        j                  | j                  j                  d      | j                  j                  d      t
        j                        }|j                         | _        | j                  S )Nzutf-8)msg	digestmod)	hmacnewr	   encoder   hashlibsha256	hexdigestr   )r   hs     r   r   z$FacebookSession._gen_appsecret_proof>   sY    HHOO""7+!!((1nn
  !{{}###r   )NNNNNF)__name__
__module____qualname____doc__GRAPHr   r    r   r   r   r      s     )EBF3878$r   r   )r)   r"   r   r   r   objectr   __all__r+   r   r   <module>r.      s/       	5$f 5$n 
r   