Ë
    +Ñ¦hw  ã                   ó‚   — d dl mZ d dlmZ d dlmZ d dlmZ dZ G d„ de«      Z		 	 ddd	dddddddd
œ	d„Z
 ed„ «      Zy)é    )Úg)Ú
LocalProxy)ÚOAuth2ConsumerBlueprint)ÚOAuth2Sessionz(David Baumgold <david@davidbaumgold.com>c                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )ÚHerokuOAuth2Sessionc                 óL   •— t        ‰| �  |i |¤Ž d|› �}|| j                  d<   y )Nz%application/vnd.heroku+json; version=ÚAccept)ÚsuperÚ__init__Úheaders)ÚselfÚapi_versionÚargsÚkwargsÚacceptÚ	__class__s        €úR/var/www/timesheet/venv/lib/python3.12/site-packages/flask_dance/contrib/heroku.pyr   zHerokuOAuth2Session.__init__   s/   ø€ Ü‰Ñ˜$Ð) &Ò)Ø8¸¸ÐFˆØ!'ˆ�‰�XÒó    )Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__)r   s   @r   r   r   
   s   ø„ ÷(ð (r   r   NÚ3)	Úscoper   Úredirect_urlÚredirect_toÚ	login_urlÚauthorized_urlÚsession_classÚstorageÚrule_kwargsc       	         óº   ‡— t        dt        | |||ddd|||||xs t        |	|
¬«      Šd‰j                  d<   d‰j                  d	<   ‰j                  ˆfd
„«       }‰S )a½  
    Make a blueprint for authenticating with Heroku using OAuth 2. This requires
    a client ID and client secret from Heroku. You should either pass them to
    this constructor, or make sure that your Flask application config defines
    them, using the variables :envvar:`HEROKU_OAUTH_CLIENT_ID` and
    :envvar:`HEROKU_OAUTH_CLIENT_SECRET`.

    Args:
        client_id (str): The client ID for your application on Heroku.
        client_secret (str): The client secret for your application on Heroku
        scope (str, optional): comma-separated list of scopes for the OAuth token
        api_version (str): The version number of the Heroku API you want to use.
            Defaults to version 3.
        redirect_url (str): the URL to redirect to after the authentication
            dance is complete
        redirect_to (str): if ``redirect_url`` is not defined, the name of the
            view to redirect to after the authentication dance is complete.
            The actual URL will be determined by :func:`flask.url_for`
        login_url (str, optional): the URL path for the ``login`` view.
            Defaults to ``/heroku``
        authorized_url (str, optional): the URL path for the ``authorized`` view.
            Defaults to ``/heroku/authorized``.
        session_class (class, optional): The class to use for creating a
            Requests session. Defaults to
            :class:`~flask_dance.contrib.HerokuOAuth2Session`.
        storage: A token storage class, or an instance of a token storage
                class, to use for this blueprint. Defaults to
                :class:`~flask_dance.consumer.storage.session.SessionStorage`.
        rule_kwargs (dict, optional): Additional arguments that should be passed when adding
            the login and authorized routes. Defaults to ``None``.

    :rtype: :class:`~flask_dance.consumer.OAuth2ConsumerBlueprint`
    :returns: A :doc:`blueprint <flask:blueprints>` to attach to your Flask app.
    Úherokuzhttps://api.heroku.com/z%https://id.heroku.com/oauth/authorizez!https://id.heroku.com/oauth/token)Ú	client_idÚclient_secretr   r   Úbase_urlÚauthorization_urlÚ	token_urlr   r   r   r   r    r!   r"   ÚHEROKU_OAUTH_CLIENT_IDr%   ÚHEROKU_OAUTH_CLIENT_SECRETr&   c                  ó0   •— ‰ j                   t        _        y ©N)Úsessionr   Úflask_dance_heroku)Ú	heroku_bps   €r   Úset_applocal_sessionz3make_heroku_blueprint.<locals>.set_applocal_sessionV   s   ø€ à(×0Ñ0ŒÕr   )r   r   r   Úfrom_configÚbefore_app_request)r%   r&   r   r   r   r   r   r   r    r!   r"   r1   r0   s               @r   Úmake_heroku_blueprintr4      s‰   ø€ ô` (ØÜØØ#ØØØ*ØAØ5Ø!ØØØ%Ø#Ò:Ô':ØØô!€Ið$ *B€I×Ñ˜+Ñ&Ø-I€I×Ñ˜/Ñ*à×!Ñ!ó1ó "ð1ð Ðr   c                  ó"   — t         j                  S r-   )r   r/   © r   r   ú<lambda>r7   ]   s   € œA×0Ñ0€ r   )NN)Úflaskr   Úwerkzeug.localr   Úflask_dance.consumerr   Úflask_dance.consumer.requestsr   Ú__maintainer__r   r4   r$   r6   r   r   ú<module>r=      sa   ðÝ Ý %å 8Ý 7à;€ô(˜-ô (ð ØðIð ØØØØØØØØôIñX 
Ñ0Ó	1�r   