-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(189PC,189TV): add refreshToken and qrcode login #1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Copilot <[email protected]> Signed-off-by: foxxorcat <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: foxxorcat <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds refresh token functionality and QR code login capabilities for the 189PC and 189TV cloud storage drivers. The changes improve authentication mechanisms by implementing token refresh to avoid frequent re-authentication and adding QR code-based login as an alternative to password authentication.
- Implements refresh token mechanism for both 189PC and 189TV drivers to maintain sessions without re-login
- Adds QR code login functionality for 189PC driver as an alternative authentication method
- Refactors login logic to support multiple authentication types and improve session management
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
drivers/189pc/utils.go | Implements QR code login, token refresh logic, and session management improvements |
drivers/189pc/types.go | Adds new struct types for QR code login parameters and refactors login parameter structure |
drivers/189pc/meta.go | Adds login type selection and refresh token fields to driver configuration |
drivers/189pc/help.go | Adds date formatting utility function for QR code login requests |
drivers/189pc/driver.go | Updates driver initialization to support token refresh and adds cron job for session keep-alive |
drivers/189_tv/utils.go | Implements session refresh logic and keep-alive functionality |
drivers/189_tv/meta.go | Removes TempUuid from Addition struct (moved to driver struct) |
drivers/189_tv/driver.go | Adds cron job for session keep-alive and moves TempUuid to driver struct |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
copilot 的上下文阅读还是太差了,只能分析单层代码,上面的修改建议全是通过局部推断的,不过用来检查拼写错误还行 |
感谢您的贡献,有几个事情想确认: |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PC也可以加上最大尝试数量,虽然无限递归的可能挺低的
Description / 描述
Motivation and Context / 背景
Closes #1166
How Has This Been Tested? / 测试
Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmt
or prettier.我已使用
go fmt
或 prettier 格式化提交的代码。我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
我已相应更新了相关仓库(若适用)。