Esempio n. 1
0
    def POST(self):

        partial = json.loads(web.data())
        rawdata = model.build_raw_data(partial, web.ctx.environ, web.ctx.ip)
        identity = model.create_user(partial["name"])
        whorls = model.create_get_whorls(rawdata)
        model.learn(whorls, identity)
        Session.commit()

        return ""
Esempio n. 2
0
    def POST(self):

        partial = json.loads(web.data()).items()  # as in a partial fingerprint
        rawdata = model.build_raw_data(partial, web.ctx.environ, web.ctx.ip)
        whorls = model.get_whorls(rawdata)
        identity = model.identify_from(whorls)
        web.header("Content-Type", "text/html")

        if identity:
            return identity.name
        else:
            return "I dunno."