Esempio n. 1
0
def test_checkPasswd():
    id = "someone not in list"
    assert not passwd.checkPasswd(id, "passwd")

    id = "FirebirdAPI"
    assert not passwd.checkPasswd(id, "incorrectpasswd")

    id = "FirebirdAPI"
    assert passwd.checkPasswd(id, "Firebird")
Esempio n. 2
0
def test_checkPasswd():
	id = "someone not in list"
	assert not passwd.checkPasswd(id,"passwd")

	id = "FirebirdAPI"
	assert not passwd.checkPasswd(id,"incorrectpasswd")
	
	id = "FirebirdAPI"
	assert passwd.checkPasswd(id,"Firebird")
Esempio n. 3
0
def checkPasswd():
    web.header('content-type', 'text/html;charset=utf-8', unique=True)
    data = web.input()
    if "user" in data and "pw" in data:
        return passwd.checkPasswd(data.user, data.pw)
    else:
        return False
Esempio n. 4
0
def checkPasswd():
    web.header("content-type", "text/html;charset=utf-8", unique=True)
    data = web.input()
    if "user" in data and "pw" in data:
        return passwd.checkPasswd(data.user, data.pw)
    else:
        return False
Esempio n. 5
0
    def POST(self,reqtype="html"):
        username = web.input()["id"]
        pw = web.input()["pw"]
        if passwd.checkPasswd(username,pw) == True:
            global session
            session.id = username
            session.pw = pw
            return renderrouter({"message":{
		"login":"******",
		"id":session.id},"type":reqtype})
        else:
            return renderrouter({"message":errors["wrong_passwd"],"type":reqtype})
Esempio n. 6
0
 def POST(self, reqtype="html"):
     username = web.input()["id"]
     pw = web.input()["pw"]
     if passwd.checkPasswd(username, pw) == True:
         global session
         session.id = username
         session.pw = pw
         return renderrouter({
             "message": {
                 "login": "******",
                 "id": session.id
             },
             "type": reqtype
         })
     else:
         return renderrouter({
             "message": errors["wrong_passwd"],
             "type": reqtype
         })
Esempio n. 7
0
def checkPasswd():
	data=web.input()
	if "user" in data and "pw" in data:
		return passwd.checkPasswd(data.user,data.pw)
	else:
		return False