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

79 lines
8.8 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<00>uh)<00><00><><00>ddlZddlZddlZddlZddlZddlZddlm Z m
Z
m Z m Z ejej<00><03>eje<10>ZGd<04>dej$j&<00>ZGd<06>d<07>Zy)<08>N)<04>Callable<6C>Optional<61>Dict<63>Any)<01>levelc<00>2<00>eZdZUdZdZeeed<d<04>Zd<05>Z y)<06>OAuthCallbackHandlerz$Handler for OAuth callback requests.N<>callback_functionc<00><><00> tjj|j<00>}tjj |j
<00>}|jdk(<00>r*|j ddg<01>d}|j ddg<01>d}tjd|dd<00>d |<04><00><04>|jd
<EFBFBD>|jd d <0C>|j<00>d }|jj|j<00><00>tj r8|r6t#j$tj ||fd<0E><0F>j'<00>t#j$|j(j*d<0E><10>j'<00>y|jd<11>|j<00>|jjd<12>y#t,$rx}tj/d|<06><00><02>|jd<14>|j<00>|jjdt1|<06><00><00>j<00><00>Yd}~yd}~wwxYw)z-Handle GET requests to the callback endpoint.z /callback<63>code<64>r<00>statez#Received OAuth callback with code: N<>
z... and state: <20><>z Content-Typez text/htmlu<6C>
<!DOCTYPE html>
<html>
<head>
<title>Google OAuth - Success</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 20px;
text-align: center;
}
.success {
color: #4CAF50;
font-size: 24px;
margin-bottom: 20px;
}
.info {
color: #555;
margin-bottom: 30px;
}
.close-button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
</style>
</head>
<body>
<div class="success">✅ Authentication Successful!</div>
<div class="info">
You have successfully authenticated with Google.
You can now close this window and return to your application.
</div>
<button class="close-button" onclick="window.close()">Close Window</button>
<script>
// Auto-close after 10 seconds
setTimeout(function() {
window.close();
}, 10000);
</script>
</body>
</html>
T)<03>target<65>args<67>daemon<6F>rri<>s Not Foundz!Error handling callback request: i<>zInternal Server Error: )<19>urllib<69>parse<73>urlparse<73>path<74>parse_qs<71>query<72>get<65>logger<65>info<66> send_response<73> send_header<65> end_headers<72>wfile<6C>write<74>encoder r
<00> threading<6E>Thread<61>start<72>server<65>shutdown<77> Exception<6F>error<6F>str)<07>self<6C>
parsed_url<EFBFBD> query_paramsr r<00> html_content<6E>es <20>E/Users/taylorwilsdon/git/google_workspace_mcp/auth/callback_server.py<70>do_GETzOAuthCallbackHandler.do_GETs<><00><00>^ J<01><1F><1C><1C>.<2E>.<2E>t<EFBFBD>y<EFBFBD>y<EFBFBD>9<>J<EFBFBD>!<21><<3C><<3C>0<>0<><1A>1A<31>1A<31>B<>L<EFBFBD><1A><EFBFBD><EFBFBD>+<2B>-<2D>#<23>'<27>'<27><06><12><04>5<>a<EFBFBD>8<><04>$<24>(<28>(<28><17>2<EFBFBD>$<24>7<><01>:<3A><05><16> <0B> <0B>A<>$<24>s<EFBFBD><02>)<29><1B>O<EFBFBD>\a<>[b<>c<>d<><15>"<22>"<22>3<EFBFBD>'<27><14> <20> <20><1E><1B>=<3D><14> <20> <20>"<22>0 <14> <0C>d<15>
<EFBFBD>
<EFBFBD> <20> <20><1C>!4<>!4<>!6<>7<>(<28>9<>9<>d<EFBFBD><1D>$<24>$<24>3<>E<>E<>"<22>E<EFBFBD>]<5D>#<23><16><1C>e<EFBFBD>g<EFBFBD><1A> <20> <20><1F>;<3B>;<3B>/<2F>/<2F><1F><12><18>%<25>'<27><15>"<22>"<22>3<EFBFBD>'<27><14> <20> <20>"<22><14>
<EFBFBD>
<EFBFBD> <20> <20><1C>.<2E><><18> J<01> <12>L<EFBFBD>L<EFBFBD><<3C>Q<EFBFBD>C<EFBFBD>@<40> A<> <10> <1E> <1E>s<EFBFBD> #<23> <10> <1C> <1C> <1E> <10>J<EFBFBD>J<EFBFBD> <1C> <1C>6<>s<EFBFBD>1<EFBFBD>v<EFBFBD>h<EFBFBD>?<3F>F<>F<>H<> I<> I<><49>  J<01>s<00>F G <00><G <00> I <03>A.I<03>I c<00>Z<00>tj|j<00><00>d||z<00><00><03>y)z9Override to use our logger instead of printing to stderr.z - N)rr<00>address_string)r,<00>formatrs r1<00> log_messagez OAuthCallbackHandler.log_messagews'<00><00><0E> <0B> <0B>t<EFBFBD>*<2A>*<2A>,<2C>-<2D>S<EFBFBD><16><04><1B> <0A>><3E>?<3F>)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r
rr<00>__annotations__r2r6<00>r7r1r r s%<00><00>.<2E>-1<><15>x<EFBFBD><08>)<29>0<>`J<01>D@r7r c<00>R<00>eZdZdZ d dedeedefd<06>Zd d<08>Z d d <09>Z
d
e defd <0B>Z y)<0E>OAuthCallbackServerz!Server to handle OAuth callbacks.N<>port<72>callback<63>auto_open_browserc<00>R<00>||_d|_d|_||_|t_y)a
Initialize the callback server.
Args:
port: Port to listen on (default: 8080)
callback: Function to call with the code and state
auto_open_browser: Whether to automatically open the browser
N)r@r'<00> server_threadrBr r
)r,r@rArBs r1<00>__init__zOAuthCallbackServer.__init__~s-<00><00><19><04> <09><1A><04> <0B>!<21><04><1A>!2<><04><1E>2:<3A><1C>.r7<00>returnc<00><00>|jrtjd<01>y tjd|j
ft <00>|_tjd|j
<00><00><02>tj|jjd<05><06>|_ |jj<00>tjd|j
<00><00><02>y#t$r}tjd|<01><00><02><00>d}~wwxYw) z/Start the callback server in a separate thread.zServer is already runningN<67> localhostz'Starting OAuth callback server on port Trz5OAuth callback server is running on http://localhost:z!Failed to start callback server: )r'r<00>warning<6E> socketserver<65> TCPServerr@r rr$r%<00> serve_foreverrDr&r)r*)r,r0s r1r&zOAuthCallbackServer.start<72>s<><00><00> <0F>;<3B>;<3B> <12>N<EFBFBD>N<EFBFBD>6<> 7<> <12> <12>&<26>0<>0<>+<2B>t<EFBFBD>y<EFBFBD>y<EFBFBD>1I<31>K_<4B>`<60>D<EFBFBD>K<EFBFBD> <12>K<EFBFBD>K<EFBFBD>A<>$<24>)<29>)<29><1B>M<> N<>"+<2B>!1<>!1<><1B>{<7B>{<7B>0<>0<><1B>"<0E>D<EFBFBD> <1E> <11> <1E> <1E> $<24> $<24> &<26> <12>K<EFBFBD>K<EFBFBD>O<>PT<50>PY<50>PY<50>{<7B>[<5B> \<5C><><18> <12> <12>L<EFBFBD>L<EFBFBD><<3C>Q<EFBFBD>C<EFBFBD>@<40> A<> <11><> <12>s<00>B9C<00> D<03>'D<03>Dc<00><><00>|jrXtjd<01>|jj<00>|jj <00>d|_d|_ytj d<03>y)zStop the callback server.zStopping OAuth callback serverNzServer is not running)r'rrr(<00> server_closerDrI)r,s r1<00>stopzOAuthCallbackServer.stop<6F>sR<00><00> <0F>;<3B>;<3B> <12>K<EFBFBD>K<EFBFBD>8<> 9<> <10>K<EFBFBD>K<EFBFBD> <20> <20> "<22> <10>K<EFBFBD>K<EFBFBD> $<24> $<24> &<26><1E>D<EFBFBD>K<EFBFBD>!%<25>D<EFBFBD> <1E> <12>N<EFBFBD>N<EFBFBD>2<> 3r7<00>urlc<00><><00>|jsy tjd|<01><00><02>tj|<01>y#t
$r"}tj d|<02><00><02>Yd}~yd}~wwxYw)z.Open the default web browser to the given URL.FzOpening browser to: TzFailed to open browser: N)rBrr<00>
webbrowser<EFBFBD>openr)r*)r,rPr0s r1<00> open_browserz OAuthCallbackServer.open_browser<65>s]<00><00><13>%<25>%<25><18> <19> <12>K<EFBFBD>K<EFBFBD>.<2E>s<EFBFBD>e<EFBFBD>4<> 5<> <16>O<EFBFBD>O<EFBFBD>C<EFBFBD> <20><17><><18> <19> <12>L<EFBFBD>L<EFBFBD>3<>A<EFBFBD>3<EFBFBD>7<> 8<><18><> <19>s<00>-=<00> A(<03>A#<03>#A()i<>NT)rFN) r8r9r:r;<00>intrr<00>boolrEr&rOr+rTr=r7r1r?r?{sQ<00><00>+<2B>"<22>04<30>+/<2F>:<3A><1A>:<3A>#<23>H<EFBFBD>-<2D>:<3A>%)<29>:<3A>(<12>0 4<> <19><03> <19><04> r7r?)<16> http.server<65>http<74>loggingrJr$<00> urllib.parserrR<00>typingrrrr<00> basicConfig<69>INFO<46> getLoggerr8rr'<00>BaseHTTPRequestHandlerr r?r=r7r1<00><module>r`sn<00><01><13><0E><13><10><13><11>0<>0<><14><07><13><13>'<27>,<2C>,<2C>'<27> <1A><17> <1A> <1A>8<EFBFBD> $<24><06>j@<01>4<EFBFBD>;<3B>;<3B>=<3D>=<3D>j@<01>XE<19>Er7