

def create_auth_key(self, request, user, expiry=None, **kw):
    'Create a registration entry and return the registration id\n        '
    if (not expiry):
        expiry = request.cache.auth_backend.auth_key_expiry(request)
    odm = request.app.odm()
    with odm.begin() as session:
        reg = odm.registration(id=digest(user.username), user_id=session.id, expiry=expiry, confirmed=False)
        session.add(reg)
    return reg.id

dataset/ETHPy150Open quantmind/lux/lux/extensions/auth/backends.py AuthMixin.create_auth_key/VarMisuse@83/121 `user`->`session`