globus_folder_sync.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:automation-examples 作者: globus 项目源码 文件源码
def get_tokens():
    tokens = None
    try:
        # if we already have tokens, load and use them
        tokens = load_data_from_file(DATA_FILE)['tokens']
    except:
        pass

    if not tokens:
        # if we need to get tokens, start the Native App authentication process
        tokens = do_native_app_authentication(CLIENT_ID, REDIRECT_URI, SCOPES)

        try:
            save_data_to_file(DATA_FILE, 'tokens', tokens)
        except:
            pass

    return tokens
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号