-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
QRCode login support & Introduce new authorization factory #2502
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Karlatemp
reviewed
Feb 17, 2023
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Outdated
Show resolved
Hide resolved
sandtechnology
requested changes
Feb 19, 2023
mirai-core/src/commonMain/kotlin/network/components/PacketCodec.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/protocol/packet/login/WtLogin.kt
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/components/QRCodeLoginProcessor.kt
Outdated
Show resolved
Hide resolved
mirai-core/src/commonMain/kotlin/network/components/PacketCodec.kt
Outdated
Show resolved
Hide resolved
This comment was marked as off-topic.
This comment was marked as off-topic.
StageGuard
changed the title
QRCode login support
QRCode login support $ Introduce new authorization factory
Feb 20, 2023
StageGuard
changed the title
QRCode login support $ Introduce new authorization factory
QRCode login support & Introduce new authorization factory
Feb 20, 2023
…rty; Rename configuration name
提醒一下, |
# Conflicts: # mirai-core/src/commonMain/kotlin/utils/MiraiProtocolInternal.kt
Closed
cssxsh
reviewed
Mar 9, 2023
Him188
reviewed
Mar 11, 2023
# Conflicts: # mirai-core-api/src/jvmMain/kotlin/utils/LoginSolver.jvm.kt
Him188
requested changes
Mar 11, 2023
Karlatemp
reviewed
Mar 13, 2023
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.
- 给productor也添加相关测试
- productor 感觉更像是通用工具类,换个包更好
TODO:
|
# Conflicts: # mirai-core/src/commonMain/kotlin/utils/MiraiProtocolInternal.kt
This reverts commit c1136a8.
StageGuard
added a commit
to StageGuard/mirai
that referenced
this pull request
Apr 14, 2023
* [core] process `wtlogin.trans_emp` to support qrcode login * [core] fix `wtlogin.trans_emp` protocol * [core] optimize QRCodeLoginProcessor logic * [core] fix `wtlogin.trans_emp` outgoing packet * [core] cancel login when logging a bot which is inconsistent from bot factory * [core] ignore `flag3` check on ANDROID_WATCH & name `flag1` and `flag2` * [core] provide default `QRCodeLoginListener` for jvm * [core] don't catch IllegalStateException in QRCodeLoginProcessor * [core] Use `LoginSolver.createQRCodeLoginListener()` instead of property; Rename configuration name * [core] Code improvement * [core] remove qrcode state lock * [core] ignore `flag3` when command is `wtlogin.trans_emp` in packet codec * [core] enable qrcode login for macos * [core] remove debug property in log * [core] reformat code * [core] rename `TransEmpResponse` to `Response` * [core] assert `flag3Exception` not null first * [core] remove arg client * [core] update qrcode login notes * [core] set custom qrcode size * [core] Draft BotAuthorization * [core] make SecretsProtection mpp * [core] BotAuthorization.byXXX * [core] Move QRCodeLoginListener to `.auth` * [core] Protect data of BotAccount * [core] Add SelectorRequireReconnectException * [core] Implementation of BotAuthorization * Revert changes of BotConfiguration * api dump * [core] remove passwordMd5 in `BotAccount` * [mock] Add new bot factory function to mock bot factory * Delete LoginCommandTest * [core] Improve QRCode render * [core] Introduce UnsupportedCaptchaMethodException & UnsupportedQRCodeCaptchaException * api dump * update docs * [core] update `DebugRunHelper` * [core] add simple block for BotAuthorization * api dump * Rename `canDoQRLogin` to `supportsQRLogin`, and specify argument names for MiraiProtocolInternal * Remove `phoneNumber` parameter from BotAccount * Make `BotAccount.<init>` with String password parameter TestOnly * Rename `InconsistentBotException` to `InconsistentBotIdException` * Rename `QRCodeLoginListener.onStatusChanged` to `QRCodeLoginListener.onStateChanged` * Rename `BotAuthorizationResult` to `BotAuthResult` * Rename BotAuthComponent, move internal APIs to internal module * Logic fixup * doc update * QRCodeLoginListener.qrCodeStateUpdateInterval & onIntervalLoop * console login with BotAuthorization * update testing * Update mirai-core-api/src/jvmMain/kotlin/utils/LoginSolver.jvm.kt * Move AuthControl outside SsoProcessor * Redesign auth * Add initialTicket to producerCoroutine * Revert protocol changes of MACOS * Fix latch death locking * Fix CoroutineOnDemandValueScope.receiveOrNull exceptional finish * Fix exception collecting * Fix DefaultBotAuthorizationFactory loading * [core] qrcode login for IPAD protocol * Revert "[core] qrcode login for IPAD protocol" This reverts commit c1136a8. --------- Co-authored-by: Karlatemp <kar@kasukusakura.com> Co-authored-by: Him188 <Him188@mamoe.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
QRCode Login
testdocumentbrief intro of New Authorization
Provide:
Users can implement custom authorizer instead of default implementations like: