コード例 #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")
コード例 #2
0
ファイル: test_passwd.py プロジェクト: scaret/FirebirdAPI
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")
コード例 #3
0
ファイル: includes.py プロジェクト: moqi88/FirebirdAPI
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
コード例 #4
0
ファイル: includes.py プロジェクト: scaret/FirebirdAPI
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
コード例 #5
0
ファイル: bbslogin.py プロジェクト: scaret/FirebirdAPI
    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})
コード例 #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
         })
コード例 #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