
    Ch                         S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKJrJr  S S	KJrJr   " S
 S\5      rg)    )StripeService)AuthenticationError)_api_encode)OAuth)	urlencode)RequestOptions)_ClientOptions)castOptional)NotRequired	TypedDictc                     ^  \ rS rSr% \\   \S'   SU 4S jjr " S S\5      r	S r
0 0 4S\R                  S\	S	\4S
 jjr0 4S\R                  S\S	\R"                  4S jjr0 4S\R&                  S\S	\R(                  4S jjrSrU =r$ )OAuthService   _optionsc                 8   > [         [        U ]  U5        X l        g N)superr   __init__r   )selfclientoptions	__class__s      X/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/_oauth_service.pyr   OAuthService.__init__   s    lD*62    c                   &    \ rS rSr% \\   \S'   Srg)%OAuthService.OAuthAuthorizeUrlOptions   express N)__name__
__module____qualname____firstlineno__r   bool__annotations____static_attributes__r!   r   r   OAuthAuthorizeUrlOptionsr      s    T""	r   r)   c                     SU;   a  g U R                   =(       a    U R                   R                  nU(       a  X!S'   g [        S5      e)N	client_ida  No client_id provided. (HINT: set your client_id when configuring your StripeClient: "stripe.StripeClient(..., client_id=<CLIENT_ID>)"). You can find your client_ids in your Stripe dashboard at https://dashboard.stripe.com/account/applications/settings, after registering your account as a platform. See https://stripe.com/docs/connect/standalone-accounts for details, or email support@stripe.com if you have any questions.)r   r+   r   )r   paramsr+   s      r   _set_client_idOAuthService._set_client_id   sF    & MM=dmm&=&=	"+;!E
 	
r   r,   r   returnc                    UR                  S5      (       a  SnOSnU R                  U5        SU;  a  SUS'   [        [        [	        US5      5      5      nU R
                  R                  R                  S5      nUc   eXS-   S-   U-   nU$ )	Nr    z/express/oauth/authorizez/oauth/authorizeresponse_typecodeV1connect?)getr-   r   listr   
_requestorbase_addresses)r   r,   r   pathqueryconnect_api_baseurls          r   authorize_urlOAuthService.authorize_url/   s    
 ;;y!!-D%DF#&(&,F?#${6489:  ??99==iH+++%+e3
r   c                 l    [        [        R                  U R                  R	                  SSUUSS95      $ )Npostz/oauth/tokenr4   r,   r   base_address)r
   r   
OAuthTokenr8   requestr   r,   r   s      r   tokenOAuthService.tokenF   s@     OO##& $ 	
 		
r   c                     U R                  U5        [        [        R                  U R                  R                  SSUUSS95      $ )NrA   z/oauth/deauthorizer4   rB   )r-   r
   r   OAuthDeauthorizationr8   rE   rF   s      r   deauthorizeOAuthService.deauthorizeT   sN    
 	F#&&OO##$& $ 	
 		
r   )r   r   )r"   r#   r$   r%   r   r	   r'   r   r   r)   r-   r   OAuthAuthorizeUrlParamsstrr>   OAuthTokenParamsr   rD   rG   OAuthDeauthorizeParamsrJ   rK   r(   __classcell__)r   s   @r   r   r      s    ~&& 9 
, 13,.-- * 
	0 IK
,,
7E
			
" #%
,,
  
 
	#	#	
 
r   r   N)stripe._stripe_servicer   stripe._errorr   stripe._encoder   stripe._oauthr   urllib.parser   stripe._request_optionsr   stripe._client_optionsr	   typingr
   r   typing_extensionsr   r   r   r!   r   r   <module>r[      s.    0 - &  " 2 1 ! 4V
= V
r   