Skip to content

feat: silent CAS auto-login and otpauth:// TOTP parsing - #4

Open
Yjiutong wants to merge 1 commit into
Conduit-Club:mainfrom
Yjiutong:codex/silent-cas-login-and-otpauth-totp
Open

Yjiutong wants to merge 1 commit into
Conduit-Club:mainfrom
Yjiutong:codex/silent-cas-login-and-otpauth-totp

Conversation

@Yjiutong

@Yjiutong Yjiutong commented Nov 6, 2026 •

Copy link
Copy Markdown

CAS 静默登录

  • 有保存凭据时隐藏登录窗口,自动填充真实 CAS 表单(#fm1Input 内的 #username、#password),待 RSA 公钥加载完成后点击可见的登录按钮,避免误触隐藏表单。
  • 仅当 /passport/v1/auth/cas 回调携带 ticket 时判定登录成功。
  • 登录窗口默认保持隐藏;仅在密码错误、需要验证码/MFA、页面加载失败或超时等异常情况下重新显示,交给用户手动完成。
  • 配置引导与设置窗口可为 CAS 保存学工号/安全手机(账号)与密码,作为静默登录的凭据来源。

TOTP 密钥解析

  • 新增 SettingsProfileLoader::normalizeTotpSecret():当密钥输入为 otpauth:// 链接(认证器导出的格式)时自动提取 secret 参数;普通明文密钥保持原样(仅去除首尾空白)。
  • 解析发生在读取配置构建连接参数时,因此配置中保存链接也能正常生成验证码。
  • 设置与配置引导的 TOTP 输入框提示同步说明支持粘贴 otpauth:// 链接。

测试调整

  • configurationguidedialog_test 的 CAS 用例改为断言凭据页,与新的 CAS 登录流程一致(原用例断言无凭据页,已不适用)。

CAS login:
- Fill the real CAS form (#username/#password inside #fm1Input) and submit
  the visible button once the RSA public key is ready.
- Treat only the /passport/v1/auth/cas callback carrying a ticket as success.
- Keep the login window hidden when credentials are saved; re-show it only on
  wrong password, captcha/MFA, load failure or timeout.
- Let the configuration guide and settings collect the CAS account/password.

TOTP:
- SettingsProfileLoader::normalizeTotpSecret extracts the secret from an
  otpauth:// URL, so users can paste the authenticator export link directly.
@Yjiutong
Yjiutong force-pushed the codex/silent-cas-login-and-otpauth-totp branch from de5e1b2 to 48d3d75 Compare November 6, 2026 18:18
@Yjiutong Yjiutong changed the title feat: silent CAS auto-login and otpauth:// TOTP parsing (rebased on latest main) feat: silent CAS auto-login and otpauth:// TOTP parsing Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant