Files
google-mcp/auth/__pycache__/oauth_manager.cpython-312.pyc

65 lines
6.6 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<00>uh)<00> <00>(<00>UddlZddlZddlZddlZddlmZmZmZmZm Z ddl
m Z ddl m Z mZmZmZej"ej$<00><05>ej&e<14>ZiZeeeeeffed< ddeded ed
ed ef
d <0C>Zded efd <0A>Zded efd<0E>Zy)<10>N)<05>Dict<63>Optional<61>Callable<6C>Any<6E>Tuple)<01>OAuthCallbackServer)<04>start_auth_flow<6F>handle_auth_callback<63>get_credentials<6C> get_user_info)<01>level<65> active_flows<77>user_id<69>scopes<65>client_secrets_path<74>port<72>returnc<00>"<00><00><01><02><03>tjd<01><00>d<02><01><00><04><00>tvr t<00><00>dtdtddf<06><02><03><01>fd<07> }t <00>|d<08> <09>} |j <00>d
<EFBFBD><03>d <0B>}t<00><02>|d <0C> <0A>\}}dtj<00><00>|||d<0F>t<00><d|<07>d<11><00><00>S#t$rZ} tjd<12><00>d| <09><00><04>dtj<00>i<00>vr!t<00>dj<00>t<00>=<00>d} ~ wwxYw)a<>
Start an OAuth flow with automatic callback handling.
Args:
user_id: The unique identifier (e.g., email address) for the user.
scopes: List of OAuth scopes required.
client_secrets_path: Path to the Google client secrets JSON file.
port: Port to run the callback server on.
Returns:
A string with instructions for the user, including the authentication URL.
zStarting OAuth flow for user z with scopes <20>code<64>staterNc<00><><00><04> tjd<01>
<EFBFBD><00><02>d<02><08>d<03>}|<02>d|<00>d|<01><00>}t<00><07> ||<02><06>\}}dt<00>
d<|t<00>
d <|t<00>
d
<tjd |<04><00><02>y#t$rF}tj d <0C>
<EFBFBD>d |<06><00><04>dt<00>
d<t |<06>t<00>
d<Yd}~yd}~wwxYw)Nz%Received authorization code for user <20>http://localhost:<3A> /callbackz?code=z&state=)rr<00>authorization_response<73> redirect_uri<72> authenticated<65>status<75>authenticated_user<65> credentials<6C>#Authentication successful for user z'Error handling OAuth callback for user <20>: <20>error)<07>logger<65>infor
r<00> Exceptionr"<00>str) rrr<00>full_callback_urlrr<00>errrrs <20><><EFBFBD><EFBFBD><EFBFBD>C/Users/taylorwilsdon/git/google_workspace_mcp/auth/oauth_manager.py<70> handle_codez%start_oauth_flow.<locals>.handle_code,s<><00><><00> 4<> <12>K<EFBFBD>K<EFBFBD>?<3F><07>y<EFBFBD>I<> J<>/<2F>t<EFBFBD>f<EFBFBD>I<EFBFBD>><3E>L<EFBFBD>#/<2F>.<2E><06>t<EFBFBD>f<EFBFBD>G<EFBFBD>E<EFBFBD>7<EFBFBD> K<> <1D>/C<01>$7<><1D>'8<>)<29> /<0E> +<2B> <1E> <0B>/><3E>L<EFBFBD><17> !<21>(<28> +<2B>:L<>L<EFBFBD><17> !<21>"6<> 7<>3><3E>L<EFBFBD><17> !<21>-<2D> 0<> <12>K<EFBFBD>K<EFBFBD>=<3D>>P<>=Q<>R<> S<><53><18> 4<> <12>L<EFBFBD>L<EFBFBD>B<>7<EFBFBD>)<29>2<EFBFBD>a<EFBFBD>S<EFBFBD>Q<> R<>.5<EFBFBD>L<EFBFBD><17> !<21>(<28> +<2B>-0<><11>V<EFBFBD>L<EFBFBD><17> !<21>'<27> *<2A><> 4<>s<00>A6A:<00>: C <03><C<03>C T)r<00>callback<63>auto_open_browserrrF)rrr<00>auto_handle_callback<63>pending)r<00>
start_timer<00>server<65>auth_urlrzDAuthentication required. Please visit this URL to authorize access: a
A browser window should open automatically. After authorizing, you'll be redirected to a success page.
If the browser doesn't open automatically, copy and paste the URL into your browser. You can also check the status of your authentication by using:
check_auth_status
user_id: z#Error starting OAuth flow for user r!r0) r#r$r<00>stop_oauth_flowr&r<00>startr <00>timer%r"<00>get<65>stop)
rrrrr*<00>callback_serverrr1rr(s
```` r)<00>start_oauth_flowr8sI<00><><00>$ <0B>K<EFBFBD>K<EFBFBD>/<2F><07>y<EFBFBD> <0A>f<EFBFBD>X<EFBFBD>N<>O<><0F>,<2C><1E><17><07> <20>4<>#<23>4<>c<EFBFBD>4<>d<EFBFBD>4<>4<>:*<2A> <11><1C><1E><06>O<EFBFBD> )<0E><17><1D><1D><1F>+<2B>4<EFBFBD>&<26> <09>:<3A> <0C>)<29> 3<><19>%<25>!&<26> 
<EFBFBD><0F><08>%<25> <20><1E>)<29>)<29>+<2B><1C>%<25> <20><1A> !
<EFBFBD> <0C>W<EFBFBD><1D>S<01><17>j<EFBFBD><18>  <20>y<EFBFBD> "<22>
<EFBFBD><EFBFBD> <15><0E><0E> <0C> <0C>:<3A>7<EFBFBD>)<29>2<EFBFBD>a<EFBFBD>S<EFBFBD>I<>J<> <13>|<7C>'<27>'<27><07><12>4<> 4<> <18><17> !<21>(<28> +<2B> 0<> 0<> 2<><1C>W<EFBFBD>%<25> <0A><> <0E>s<00>AB+<00>+ D<03>4AD <03> Dc<00><><00>|tvrd|<00>d<02>St|}|jdd<04>}|dk(r|jdd<04>}d|<03>d<08>S|d k(r|jd d
<EFBFBD>}d |<04><00>S|d k(r\ttj<00>|jd tj<00><00>z
<00>}|jdd<0F>}d|<05>d|<06><00>Sd|<02><00>S)z<>
Check the status of an active OAuth flow.
Args:
user_id: The unique identifier for the user.
Returns:
A string describing the current status.
<20>-No active authentication flow found for user <20>.r<00>unknownrrr z,. You can now use the Google Calendar tools.r"z Unknown errorzAuthentication failed: r.r/r1<00>zAuthentication pending for z0 seconds. Please complete the authorization at: zUnknown authentication status: )rr5<00>intr4)r<00>flowrrr"<00>elapsedr1s r)<00>check_auth_statusrAzs<><00><00><0F>l<EFBFBD>"<22>><3E>w<EFBFBD>i<EFBFBD>q<EFBFBD>I<>I<> <17><07> <20>D<EFBFBD> <11>X<EFBFBD>X<EFBFBD>h<EFBFBD> <09> *<2A>F<EFBFBD> <0A><1F> <20>!<21>X<EFBFBD>X<EFBFBD>&:<3A>I<EFBFBD>F<><1A>1<>2D<32>1E<31>F9<> :<3A>
<EFBFBD>
<10>7<EFBFBD> <1A><14><08><08><17>/<2F>2<><05>(<28><15><07>0<>0<> <0F>9<EFBFBD> <1C><15>d<EFBFBD>i<EFBFBD>i<EFBFBD>k<EFBFBD>D<EFBFBD>H<EFBFBD>H<EFBFBD>\<5C>4<EFBFBD>9<EFBFBD>9<EFBFBD>;<3B>$G<>G<>H<><07><17>8<EFBFBD>8<EFBFBD>J<EFBFBD><02>+<2B><08>)<29>'<27><19>35<33>5=<3D>J<EFBFBD> @<01>
<EFBFBD>
1<><16><08>9<>9<>c<00>(<00>|tvrd|<00>d<02>S dt|vrt|dj<00>t|jdd<05>}t|=d|<00>d|<01>d<02>S#t$r*}tj d|<00>d |<02><00><04>d
|<02><00>cYd }~Sd }~wwxYw) z<>
Stop an active OAuth flow and clean up resources.
Args:
user_id: The unique identifier for the user.
Returns:
A string describing the result.
r:r;r0rr<zAuthentication flow for user z stopped. Final status: z#Error stopping OAuth flow for user r!z$Error stopping authentication flow: N)rr6r5r%r#r")r<00> final_statusr(s r)r2r2<00>s<><00><00><0F>l<EFBFBD>"<22>><3E>w<EFBFBD>i<EFBFBD>q<EFBFBD>I<>I<> :<3A> <13>|<7C>G<EFBFBD>,<2C> ,<2C> <18><17> !<21>(<28> +<2B> 0<> 0<> 2<>$<24>G<EFBFBD>,<2C>0<>0<><18>9<EFBFBD>E<> <0C> <18><17> !<21>.<2E>w<EFBFBD>i<EFBFBD>7O<37>P\<5C>~<7E>]^<5E>_<>_<><5F> <14>:<3A><0E> <0C> <0C>:<3A>7<EFBFBD>)<29>2<EFBFBD>a<EFBFBD>S<EFBFBD>I<>J<>5<>a<EFBFBD>S<EFBFBD>9<>9<><39>:<3A>s<00>A A<00> B<03>'B <03>B<03> B)zclient_secret.jsoni<6E>)<1E>logging<6E>os<6F> threadingr4<00>typingrrrrr<00>auth.callback_serverr<00>auth.google_authr r
r r <00> basicConfig<69>INFO<46> getLogger<65>__name__r#rr&<00>__annotations__<5F>listr>r8rAr2<00>rBr)<00><module>rRs<><00><01><0F> <09><10> <0B>7<>7<>4<>b<>b<><14><07><13><13>'<27>,<2C>,<2C>'<27> <1A><17> <1A> <1A>8<EFBFBD> $<24><06>+-<2D> <0C>d<EFBFBD>3<EFBFBD><04>S<EFBFBD>#<23>X<EFBFBD><0E>&<26>'<27>,<2C>
4<><14> e<0E> <10>e<0E> <10>e<0E><1D>e<0E> <0E> e<0E>
 <09> e<0E>N!:<3A>s<EFBFBD>!:<3A>s<EFBFBD>!:<3A>F:<3A>S<EFBFBD>:<3A>S<EFBFBD>:rB