How do I set up my store_tokens_callback_method?

新規投稿

コメント

1件のコメント

  • Scott Hurrey

    You will need a method in your application. You then pass that method in place of "your_store_tokens_callback_method". When the SDK receives the tokens from Box, it will call that method and send the tokens for you to store however you need to. Something like this:

    def store_tokens(access_token, refresh_token):
    # store the tokens at secure storage (e.g. Keychain)
       pass

    auth = JWTAuth(
    client_id=Config.jwt_config['client_id'],
    client_secret=Config.jwt_config['client_secret'],
    enterprise_id=Config.jwt_config['enterprise_id'],
    jwt_key_id=Config.jwt_config['jwt_key_id'],
    rsa_private_key_file_sys_path=Config.jwt_config['rsa_private_key_file_sys_path'],
    rsa_private_key_passphrase=Config.jwt_config['rsa_private_key_passphrase'],
    store_tokens=store_tokens,
    )

     

    0
    コメントアクション パーマリンク

投稿コメントは受け付けていません。