コード例 #1
0
ファイル: main.py プロジェクト: m-wynn/cv_account
def provisionAcct(netID, user, hmac, time):
    if handshake.verify(netID, user, hmac, time):
        password = acctMgr.mkPassword()
        if acctMgr.provision(netID, user, password):
            handshake.sendPassword(netID, user, password)
            return json.dumps("Your password has been emailed to you")
        else:
            return json.dumps("An error occured, please contact an admin")
コード例 #2
0
ファイル: main.py プロジェクト: collegiumv/cv_account
def provisionAcct(netID, user, hmac, time):
    if handshake.verify(netID, user, hmac, time):
        password = acctMgr.mkPassword()
        if acctMgr.provision(netID, user, password):
            handshake.sendPassword(netID, user, password)
            return json.dumps("Your password has been emailed to you")
        else:
            return json.dumps("An error occured, please contact an admin")
コード例 #3
0
ファイル: main.py プロジェクト: m-wynn/cv_account
def chPassword(netID, user, hmac, time):
    if handshake.verify(netID, user, hmac, time):
        password = acctMgr.mkPassword()
        if acctMgr.chPassword(user, password):
            handshake.sendPassword(netID, user, password)
            return "Your password has been emailed to you"
        else:
            return "Your password could not be reset, please try again later"
    else:
        return "An error occured, perhaps you have an old link?"
コード例 #4
0
ファイル: main.py プロジェクト: collegiumv/cv_account
def chPassword(netID, user, hmac, time):
    if handshake.verify(netID, user, hmac, time):
        password = acctMgr.mkPassword()
        if acctMgr.chPassword(user, password):
            handshake.sendPassword(netID, user, password)
            return "Your password has been emailed to you"
        else:
            return "Your password could not be reset, please try again later"
    else:
        return "An error occured, perhaps you have an old link?"