Ejemplo 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")
Ejemplo 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")
Ejemplo 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
Ejemplo 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
Ejemplo 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})
Ejemplo 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
         })
Ejemplo 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