def __init__(self, user_id): self.cid = uuid.uuid1().hex[:20] mc.set(OAUTH_CONFIRM % (user_id, self.cid), 1, ONE_MINUTE)
def __init__(self, apikey, user_id): self.code = uuid.uuid1().hex[:20] mc.set(self.__mc_key(apikey, self.code), user_id, TEN_MINUTES)