Repository navigation
Conversation
Silent CAS login: - SsoLoginWebView hides the window when credentials are saved, fills the real CAS form (#username/#password inside #fm1Input), waits for the RSA public key, then clicks the visible submit button. - Success is only the /passport/v1/auth/cas callback carrying a ticket. - The window is re-shown only on failure, captcha/MFA prompt, load error, or timeout, so manual verification happens solely on exception. - AuthDialogCoordinator drives the hidden-then-fallback flow; config guide and settings now collect CAS work/phone account and password. - QSettings password fields use fromBase64/toBase64 to avoid mojibake. TOTP parsing: - SettingsProfileLoader::normalizeTotpSecret extracts the raw secret from an otpauth:// URL (authenticator export link), passing through plain secrets. Applied on load and on save in both settings and config guide, so the stored value is always the bare secret. Docs/tests: - Document the deploy requirement (bare build/Release exe needs Qt libs) and update silent-login wording; add normalizeTotpSecret unit test. No build artifacts (build/, SHOUConnect-local/, build-tests/) are committed; they remain gitignored. Real credentials are never written to the repo.
Yjiutong
force-pushed
the
codex/silent-cas-login-and-otpauth-totp
branch
from
November 6, 2026 17:59
fd2cc05 to
de5e1b2
Compare
This file contains hidden or 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
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.
本次递交改进了什么
1. CAS 静默自动登录
SsoLoginWebView在有保存凭据时隐藏窗口,自动填充真实 CAS 表单(#fm1Input内的#username/#password),等待 RSA 公钥加载完成后点击可见的登录按钮,避免误触隐藏表单。ticket的/passport/v1/auth/cas回调视为成功。AuthDialogCoordinator统一驱动「隐藏 → 异常回退」流程;配置引导与设置窗口现可保存 CAS 学工号/安全手机(账号)和密码。QSettings密码字段统一用fromBase64/toBase64,修复中文可能存在的乱码。2. TOTP 密钥支持 otpauth:// 链接自动解析
SettingsProfileLoader::normalizeTotpSecret():识别otpauth://前缀并用QUrl/QUrlQuery提取secret参数;普通明文密钥原样保留(仅去除首尾空格)。config.ini中最终只存裸密钥。otpauth://链接。3. 文档与测试
docs/ADVANCED_USAGE.md更新静默登录说明。normalizeTotpSecret单元测试(使用占位密钥,不含任何真实凭据)。验证
settingsprofileloader_test运行通过(exit 0),此前 CTest 全集 18/18 通过。SHOUConnect-local已补齐核心zju-connect.exe并windeployqt更新,可正常启动。注意(需人工验证,构建通过不能替代)
补充:个人人工测试通过,仍需更多样本验证可靠性