def confirm(cls, user_id, cid): key = OAUTH_CONFIRM % (user_id, cid) if mc.get(key): mc.delete(key) return True
def check(cls, apikey, code): key = cls.__mc_key(apikey, code) user_id = mc.get(key) if user_id: mc.delete(key) return user_id