Add optional CooperativelyManagedOAuth2 functionality to always check for new tokens
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
CooperativelyManagedOAuth2Mixinから始め、特に _get_tokens()、_get_and_update_current_tokens()、および BoxSessionで使用される access_tokenプロパティを確認します。refresh()、revoke()、APIリクエストがどのようにトークンを取得するかを追跡し、その後、サブクラスと初期化パラメーターによるオプションを比較します。選択したオプションの動作が仕様化され、実装され、キャッシュ済みトークンと新たに取得したトークンの両方についてカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
CooperativelyManagedOAuth2Mixin overrides _get_tokens(). When refresh() or revoke() are called, this protected method is called to get the latest tokens. However, the access_token property (used by BoxSession for all API requests) still uses the cached _access_token attribute.
During normal usage, this means that, after another instance has done a refresh, the BoxSession will usually make one API call with expired tokens before grabbing the updated tokens.
This makes sense as a default behavior. If the cooperative auth is happening over a network, then the cost of one extra API call per hour is much less than checking for new tokens for every single API call.
But if the cooperation is happening within a process and the mechanism is low-cost, it may be more economical to override the access_token property to always call _get_and_update_current_tokens() before returning the _access_token attribute.
This can be done with a CooperativelyManagedOAuth2Mixin subclass, or an __init__ parameter to toggle the behavior.
There's also the question of whether this is useful functionality to add to the SDK.
- 主要言語
- Python
- スター
- 460
- フォーク
- 224
- 平均マージ
- 11時間 29分
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
box/box-python-sdk のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
box/box-python-sdk#196 ·
メンテナーはふだん 1 日以内に返信
-
JTI claim value is not getting regenerated if API calls fails due to rate limit再び着手できるかも @mwwoda が 288 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug enhancement
box/box-python-sdk#1314 · コメント 6 件 · 担当者 5 名 ·
メンテナーはふだん 1 日以内に返信
-
Missing py.typed marker in box_sdk_gen causes mypy import-untyped error再び着手できるかも @mwwoda が 392 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
box/box-python-sdk#1154 · コメント 5 件 · 担当者 5 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
box/box-python-sdk#1155 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Implement `__eq__` for CreateFolderParent class再び着手できるかも @mwwoda が 655 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
box/box-python-sdk#1157 · コメント 1 件 · 担当者 6 名 ·
メンテナーはふだん 1 日以内に返信
box/box-python-sdk の issue をすべて見る
似ている issue
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
NousResearch/hermes-agent#132042 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepset-ai/haystack#13092 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
EverMind-AI/Raven#845 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AstrBotDevs/AstrBot#10340 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BasedHardware/omi#20401 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信