mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-27 10:19:22 +00:00
The next generation branch has been added
This commit is contained in:
20
src/twitter/authorisationHandler.py
Normal file
20
src/twitter/authorisationHandler.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import BaseHTTPServer
|
||||
from urlparse import urlparse, parse_qs
|
||||
|
||||
logged = False
|
||||
verifier = None
|
||||
|
||||
class handler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
|
||||
def do_GET(self):
|
||||
global logged
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text/html")
|
||||
self.end_headers()
|
||||
logged = True
|
||||
params = parse_qs(urlparse(self.path).query)
|
||||
global verifier
|
||||
verifier = params.get('oauth_verifier', [None])[0]
|
||||
self.wfile.write("You have successfully logged in to Twitter with TW Blue. "
|
||||
"You can close this window now.")
|
Reference in New Issue
Block a user