§
    œä¤i#  ã                   ó¬   — d dl Z d dlZd dl mZ d dlmZmZmZ d dlmZm	Z	m
Z
mZmZ d dlmZ d dlmZmZ d dlmZ d dlmZ d d	lmZ  G d
„ d¦  «        ZdS )é    N)ÚLogger)ÚOptionalÚSequenceÚUnion)ÚOAuthStateStoreÚInstallationStoreÚOAuthStateUtilsÚAuthorizeUrlGeneratorÚRedirectUriPageRenderer)ÚFileOAuthStateStore)Ú	AuthorizeÚInstallationStoreAuthorize)Ú	BoltError)Ú(get_or_create_default_installation_store)ÚCallbackOptionsc            +       óä  — e Zd ZU eed<   eed<   eee                  ed<   eee                  ed<   ee         ed<   eed<   eed<   eed<   d	Zee	         ed
<   ee         ed<   ee         ed<   eed<   e
ed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   eed<   d	d	d	d	d	dddd	d	d	d	d	ddd dd	ej        ej         ej        e ¦  «        d!œdee         dee         deeee         ef                  deeee         ef                  dee         dededed
ee	         dee         dee         dee         dee
         dededededee         dededef*d"„Zd	S )#ÚOAuthSettingsÚ	client_idÚclient_secretÚscopesÚuser_scopesÚredirect_uriÚinstall_pathÚinstall_page_rendering_enabledÚredirect_uri_pathNÚcallback_optionsÚsuccess_urlÚfailure_urlÚauthorization_urlÚinstallation_storeÚinstallation_store_bot_onlyÚ!token_rotation_expiration_minutesÚ	authorizeÚuser_token_resolutionÚstate_validation_enabledÚstate_storeÚstate_cookie_nameÚstate_expiration_secondsÚstate_utilsÚauthorize_url_generatorÚredirect_uri_page_rendererÚloggerú/slack/installTú/slack/oauth_redirectFéx   Úauthed_user)r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r$   r%   r&   r'   r(   r,   c          	      óê  — |pt           j                             d¦  «        }|pt           j                             d¦  «        }||€t          d¦  «        ‚|| _        || _        ||n2t           j                             dd¦  «                             d¦  «        | _        t          | j        t          ¦  «        r| j                             d¦  «        | _        ||n2t           j                             dd¦  «                             d¦  «        | _
        t          | j
        t          ¦  «        r| j
                             d¦  «        | _
        |pt           j                             d	¦  «        | _        |pt           j                             d
d¦  «        | _        || _        |pt           j                             dd¦  «        | _        |	| _        |
| _        || _        |pd| _        |pt'          |¦  «        | _        |pd| _        || _        || _        t1          || j        | j        | j        | j        | j        |¬¦  «        | _        || _        |pt7          ||¬¦  «        | _        || _        || _        t?          | j        | j        ¬¦  «        | _         tC          | j        | j        | j        | j
        | j        ¬¦  «        | _"        tG          | j        | j        | j        | j        ¬¦  «        | _$        dS )a
  The settings for Slack App installation (OAuth flow).

        Args:
            client_id: Check the value in Settings > Basic Information > App Credentials
            client_secret: Check the value in Settings > Basic Information > App Credentials
            scopes: Check the value in Settings > Manage Distribution
            user_scopes: Check the value in Settings > Manage Distribution
            redirect_uri: Check the value in Features > OAuth & Permissions > Redirect URLs
            install_path: The endpoint to start an OAuth flow (Default: `/slack/install`)
            install_page_rendering_enabled: Renders a web page for install_path access if True
            redirect_uri_path: The path of Redirect URL (Default: `/slack/oauth_redirect`)
            callback_options: Give success/failure functions f you want to customize callback functions.
            success_url: Set a complete URL if you want to redirect end-users when an installation completes.
            failure_url: Set a complete URL if you want to redirect end-users when an installation fails.
            authorization_url: Set a URL if you want to customize the URL `https://slack.com/oauth/v2/authorize`
            installation_store: Specify the instance of `InstallationStore` (Default: `FileInstallationStore`)
            installation_store_bot_only: Use `InstallationStore#find_bot()` if True (Default: False)
            token_rotation_expiration_minutes: Minutes before refreshing tokens (Default: 2 hours)
            user_token_resolution: The option to pick up a user token per request (Default: authed_user)
                The available values are "authed_user" and "actor". When you want to resolve the user token per request
                using the event's actor IDs, you can set "actor" instead. With this option, bolt-python tries to resolve
                a user token for context.actor_enterprise/team/user_id. This can be useful for events in Slack Connect
                channels. Note that actor IDs can be absent in some scenarios.
            state_validation_enabled: Set False if your OAuth flow omits the state parameter validation (Default: True)
            state_store: Specify the instance of `InstallationStore` (Default: `FileOAuthStateStore`)
            state_cookie_name: The cookie name that is set for installers' browser. (Default: "slack-app-oauth-state")
            state_expiration_seconds: The seconds that the state value is alive (Default: 600 seconds)
            logger: The logger that will be used internally
        ÚSLACK_CLIENT_IDÚSLACK_CLIENT_SECRETNz-Both client_id and client_secret are requiredÚSLACK_SCOPESÚ ú,ÚSLACK_USER_SCOPESÚSLACK_REDIRECT_URIÚSLACK_INSTALL_PATHr-   ÚSLACK_REDIRECT_URI_PATHr.   z$https://slack.com/oauth/v2/authorizer0   )r,   r   r   r"   r    Úbot_onlyr$   )Úexpiration_secondsr   )Úcookie_namer<   )r   r   r   r   r   )r   r   r   r   )%ÚosÚenvironÚgetr   r   r   Úsplitr   Ú
isinstanceÚstrr   r   r   r   r   r   r   r   r   r   r    r$   r!   r"   r   r#   r%   r   r&   r'   r(   r	   r)   r
   r*   r   r+   )Úselfr   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r$   r%   r&   r'   r(   r,   s                         úZ/root/projects/butler/venv/lib/python3.11/site-packages/slack_bolt/oauth/oauth_settings.pyÚ__init__zOAuthSettings.__init__6   sâ  € ðv ÐB¥¤§¢Ð0AÑ!BÔ!Bˆ	Ø%ÐN­¬¯ªÐ8MÑ)NÔ)NˆØÐ Ð 5ÝÐKÑLÔLÐLØ"ˆŒØ*ˆÔà &Ð 2ff½¼
¿ºÀ~ÐWYÑ8ZÔ8Z×8`Ò8`ÐadÑ8eÔ8eˆŒÝd”k¥3Ñ'Ô'ð 	1Øœ+×+Ò+¨CÑ0Ô0ˆDŒKØ*5Ð*A˜;˜;ÅrÄzÇ~Â~ÐViÐkmÑGnÔGn×GtÒGtÐuxÑGyÔGyˆÔÝdÔ&­Ñ,Ô,ð 	;Ø#Ô/×5Ò5°cÑ:Ô:ˆDÔØ(ÐP­B¬J¯NªNÐ;OÑ,PÔ,PˆÔà(Ðb­B¬J¯NªNÐ;OÐQaÑ,bÔ,bˆÔØ.LˆÔ+Ø!2Ð!xµb´j·n²nÐE^Ð`wÑ6xÔ6xˆÔØ 0ˆÔØ&ˆÔØ&ˆÔØ!2Ð!\Ð6\ˆÔà"4Ð"kÕ8`ÐajÑ8kÔ8kˆÔØ%:Ð%K¸mˆÔ"Ø+FˆÔ(Ø1RˆÔ.Ý3ØØ”nØÔ,Ø.2Ô.TØ#Ô6ØÔ5Ø"7ð
ñ 
ô 
ˆŒð )AˆÔ%Ø&ð 
Õ*=Ø7Øð+
ñ +
ô +
ˆÔð "3ˆÔØ(@ˆÔ%å*ØÔ.Ø#Ô<ð
ñ 
ô 
ˆÔõ (=Ø”nØÔ*Ø”;ØÔ(Ø"Ô4ð(
ñ (
ô (
ˆÔ$õ +BØÔ*Ø"Ô4ØÔ(ØÔ(ð	+
ñ +
ô +
ˆÔ'Ð'Ð'ó    )Ú__name__Ú
__module__Ú__qualname__rC   Ú__annotations__r   r   Úboolr   r   r   Úintr   r   r	   r
   r   r   Údefault_cookie_nameÚdefault_expiration_secondsÚloggingÚ	getLoggerr   rF   © rG   rE   r   r      s  € € € € € € à€N€NNØÐÐÑØX˜c”]Ô#Ð#Ð#Ñ#Ø˜( 3œ-Ô(Ð(Ð(Ñ(Ø˜3”-ÐÐÑàÐÐÑØ$(Ð(Ð(Ñ(ØÐÐÑØ26Ðh˜Ô/Ð6Ð6Ñ6Ø˜#”ÐÐÑØ˜#”ÐÐÑØÐÐÑà)Ð)Ð)Ñ)Ø!%Ð%Ð%Ñ%Ø'*Ð*Ð*Ñ*ØÐÐÑØÐÐÑà"Ð"Ð"Ñ"Ø Ð Ð Ñ ØÐÐÑØ!Ð!Ð!Ñ!à Ð Ð Ñ Ø2Ð2Ð2Ñ2Ø 7Ð7Ð7Ñ7à€N€NNð $(Ø'+Ø6:Ø;?Ø&*à,Ø/3Ø!8Ø6:Ø%)Ø%)Ø+/à:>Ø,1Ø14Ø%2à)-Ø15Ø!0Ô!DØ(7Ô(Rà*˜Ô*¨8Ñ4Ô4ð9x
ð x
ð x
ð ˜C”=ð	x
ð
   ”}ðx
ð ˜˜x¨œ}¨cÐ1Ô2Ô3ðx
ð ˜e H¨S¤M°3Ð$6Ô7Ô8ðx
ð ˜s”mðx
ð ðx
ð )-ðx
ð ðx
ð # ?Ô3ðx
ð ˜c”]ðx
ð ˜c”]ðx
ð  $ Cœ=ð!x
ð$ %Ð%6Ô7ð%x
ð& &*ð'x
ð( ,/ð)x
ð*  #ð+x
ð. #'ð/x
ð0 ˜oÔ.ð1x
ð2 ð3x
ð4 #&ð5x
ð8 ð9x
ð x
ð x
ð x
ð x
ð x
rG   r   )rP   r>   r   Útypingr   r   r   Úslack_sdk.oauthr   r   r	   r
   r   Úslack_sdk.oauth.state_storer   Ú"slack_bolt.authorization.authorizer   r   Úslack_bolt.errorr   Úslack_bolt.oauth.internalsr   Ú!slack_bolt.oauth.callback_optionsr   r   rR   rG   rE   ú<module>rZ      s+  ðØ €€€Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ðð ð ð ð ð ð ð ð ð ð ð ð ð ð <Ð ;Ð ;Ð ;Ð ;Ð ;à TÐ TÐ TÐ TÐ TÐ TÐ TÐ TØ &Ð &Ð &Ð &Ð &Ð &Ø OÐ OÐ OÐ OÐ OÐ OØ =Ð =Ð =Ð =Ð =Ð =ðY
ð Y
ð Y
ð Y
ð Y
ñ Y
ô Y
ð Y
ð Y
ð Y
rG   