Exemple #1
0
def auth():
    if request.method == "POST":
        username = request.form["username"]
        password = request.form["password"]
        con = connect_sqlite()
        if not auth_user(con, username, password):
            return redirect("/static/login.html?fail=1")
        else:
            token = uuid4()
            session["token"] = token
            session.modified = True
            server.insert_token(token, username)
            server.online = True
            return redirect("/starting")
    return redirect("/static/login.html")
Exemple #2
0
print "lapis - Minecraft + Azure = Wonders"
print "First, you'll need to link your Azure account."
azure_login()

print "Cool! Now, pick a name for your service."

name = raw_input("Name: ")

print "Awesome! Let's set you up with a username and password."

username = raw_input("User: "******"Pass: "******"name"] = name
config["online"] = True

with open("server.json", "w") as cfg:
    json.dump(config, cfg)

print "Now that we're finished with that, give us some time to spin up your server."
print "Fair warning, this is gonna take a while. Feel free to sing a song or five."

azure_create_server(name)