def load_publickey(self, text): """ Load Bob's public key. """ for type_, blob in dearmor(text): if type_ in ['dh-publickey']: self.B = bytes2int(blob) break
def checkCredentials(self, conn): DEBUG(AUTH, "looking for auth cookie") auth = conn.requestCookie.get(self.cookieName) if not auth: return None #have cookie, now check, assuming basicAuth style cookie w/armoring auth = auth.value txt = armor.dearmor(self.cookieNonce, auth) if not txt: return bits = txt.split(':') user = bits[0] password = '******'.join(bits[1:]) conn.remoteUser = user conn.remotePassword = password conn.env['REMOTE_USER'] = conn.remoteUser conn.env['REMOTE_PASSWORD'] = conn.remotePassword return self.validate(user, password)
def checkCredentials(self, conn): DEBUG(AUTH, "looking for auth cookie") auth = conn.requestCookie.get(self.cookieName) if not auth: return None #have cookie, now check, assuming basicAuth style cookie w/armoring auth = auth.value txt = armor.dearmor(self.cookieNonce, auth) if not txt: return bits = txt.split(':') user = bits[0] password = '******'.join(bits[1:]) conn.remoteUser = user conn.remotePassword = password conn.env['REMOTE_USER']=conn.remoteUser conn.env['REMOTE_PASSWORD']=conn.remotePassword return self.validate(user, password)