pythongssapi / pythongssapi/python-gssapi
Provide Credentials.valid property to inspect validity without catching exceptions
未關閉
還沒有人認領這個 Issue。
enhancement
- 主要語言
- Python
- 星號
- 116
- 分支
- 55
- 平均合併
- 1 天 24 分鐘
- 30 天內合併 PR
- 2
描述
When determinig whether given credentials are valid, I currently need to inquire them and catch an exception. Like this:
try:
cred.lifetime
# valid
except ExpiredCredentialsError:
# invalid
It would be nice if the Credentials object itself had a valid property that would provide this information.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先定位 Credentials 物件和現有的 cred.lifetime 存取路徑,然後檢查 ExpiredCredentialsError 是如何引發的。定義 valid 屬性,讓呼叫端無需捕捉該例外即可檢查 credential 的有效性,並為有效和已過期的 credential 都新增涵蓋測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- authentication, security
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100