Ë
    +Ñ¦ht  ã                   ó„   — 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œ
d„Z
 ed„ «      Zy)é    )Úg)Ú
LocalProxy)ÚOAuth2ConsumerBlueprint)ÚOAuth2Sessionz'Justin Georgeson <jgeorgeson@lopht.net>c                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )ÚNoVerifyOAuth2Sessionc                 ó2   •— t        ‰| �  |i |¤Ž d| _        y )NF)ÚsuperÚ__init__Úverify)ÚselfÚargsÚkwargsÚ	__class__s      €úR/var/www/timesheet/venv/lib/python3.12/site-packages/flask_dance/contrib/gitlab.pyr   zNoVerifyOAuth2Session.__init__   s   ø€ Ü‰Ñ˜$Ð) &Ò)Øˆ�ó    )Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__)r   s   @r   r   r   
   s   ø„ ÷ð r   r   Nz
gitlab.comT)
ÚscopeÚredirect_urlÚredirect_toÚ	login_urlÚauthorized_urlÚsession_classÚstorageÚhostnameÚverify_tls_certificatesÚrule_kwargsc       
         óð   ‡— |
s|rt        d«      ‚t        }t        dt        | ||d|	› d�d|	› d�d|	› d�||||||d|
i|¬«      Šd	‰j                  d
<   d‰j                  d<   ‰j
                  ˆfd„«       }‰S )aí  
    Make a blueprint for authenticating with GitLab using OAuth 2. This requires
    a client ID and client secret from GitLab. You should either pass them to
    this constructor, or make sure that your Flask application config defines
    them, using the variables :envvar:`GITLAB_OAUTH_CLIENT_ID` and
    :envvar:`GITLAB_OAUTH_CLIENT_SECRET`.

    Args:
        client_id (str): The client ID for your application on GitLab.
        client_secret (str): The client secret for your application on GitLab
        scope (str, optional): comma-separated list of scopes for the OAuth token
        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 ``/gitlab``
        authorized_url (str, optional): the URL path for the ``authorized`` view.
            Defaults to ``/gitlab/authorized``.
        session_class (class, optional): The class to use for creating a
            Requests session. Defaults to
            :class:`~flask_dance.consumer.requests.OAuth2Session`.
        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`.
        hostname (str, optional): If using a private instance of GitLab CE/EE,
            specify the hostname, default is ``gitlab.com``.
        verify_tls_certificates (bool, optional): Specify whether TLS
            certificates should be verified. Set this to ``False`` if
            certificates fail to validate for self-hosted GitLab instances.
        rule_kwargs (dict, optional): Additional arguments that should be passed when adding
            the login and authorized routes. Defaults to ``None``.
            specify the hostname, default is ``gitlab.com``

    :rtype: :class:`~flask_dance.consumer.OAuth2ConsumerBlueprint`
    :returns: A :doc:`blueprint <flask:blueprints>` to attach to your Flask app.
    z@cannot override session_class and disable certificate validationÚgitlabzhttps://z/api/v4/z/oauth/authorizez/oauth/tokenr   )Ú	client_idÚclient_secretr   Úbase_urlÚauthorization_urlÚ	token_urlr   r   r   r   r   r   Útoken_url_paramsr    ÚGITLAB_OAUTH_CLIENT_IDr#   ÚGITLAB_OAUTH_CLIENT_SECRETr$   c                  ó0   •— ‰ j                   t        _        y ©N)Úsessionr   Úflask_dance_gitlab)Ú	gitlab_bps   €r   Úset_applocal_sessionz3make_gitlab_blueprint.<locals>.set_applocal_sessionb   s   ø€ à(×0Ñ0ŒÕr   )Ú
ValueErrorr   r   r   Úfrom_configÚbefore_app_request)r#   r$   r   r   r   r   r   r   r   r   r   r    r0   r/   s                @r   Úmake_gitlab_blueprintr4      sÂ   ø€ ñj #ÙÜØRóð ô 2ˆMä'ØÜØØ#ØØ˜H˜: XÐ.Ø$ X JÐ.>Ð?Ø˜X˜J lÐ3Ø!ØØØ%Ø#ØØ"Ð$;Ð<Øô!€Ið$ *B€I×Ñ˜+Ñ&Ø-I€I×Ñ˜/Ñ*à×!Ñ!ó1ó "ð1ð Ðr   c                  ó"   — t         j                  S r,   )r   r.   © r   r   ú<lambda>r7   i   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=      sd   ðÝ Ý %å 8Ý 7à:€ô˜Mô ð ØðVð ØØØØØØØØ ØôVñr 
Ñ0Ó	1�r   