New Way to login (For Debugging) - this way production will work as it should!

This commit is contained in:
Sagi Dayan 2015-07-01 14:58:44 +03:00
parent 99f7f32075
commit 05766a5be2
2 changed files with 41 additions and 0 deletions

View file

@ -206,6 +206,10 @@ def login():
return github.authorize()
@app.route('/debug/login')
def set_local_token_view():
return app.send_static_file('DEBUG_Views/set_cookie.html')
@app.route('/api/qa/init')
def init_QA():

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
cookie_name = "com.sehub.www";
var YouEntered;
function putCookie() {
if(document.cookie != document.cookie)
{index = document.cookie.indexOf(cookie_name);}
else
{ index = -1;}
if (index == -1)
{
YouEntered=document.cf.cfd.value;
document.cookie=""+cookie_name+"="+YouEntered+"; path=/";
window.location.assign("/");
}
}
</SCRIPT>
<FORM NAME="cf">
Enter The User Token: <INPUT TYPE="text" NAME="cfd" size="20">
<INPUT TYPE="button" Value="Set to Cookie"
onClick="putCookie()">
</FORM>
</body>
</html>