feat(mobile): add v1 server info and device auth sessions

This commit is contained in:
truewhile
2026-10-17 12:27:28 +08:00
parent 40982f6675
commit 1c45483e1f
28 changed files with 2442 additions and 50 deletions
+7
View File
@@ -31,6 +31,8 @@ type DeviceService struct {
log *zap.Logger
repo *repository.Container
sessions *SessionTrackerService
// authSessions 用于踢出设备时立即撤销其认证会话;nil 表示旧装配路径。
authSessions *AuthSessionService
// notifyUser sends a Telegram message to the local user (resolved to their
// Telegram binding). Wired by the bot service; nil disables notifications.
@@ -60,6 +62,11 @@ func (s *DeviceService) SetSessionTracker(tracker *SessionTrackerService) {
s.sessions = tracker
}
// SetAuthSessionService 注入认证会话服务,使踢出设备同时撤销其新协议令牌。
func (s *DeviceService) SetAuthSessionService(sessions *AuthSessionService) {
s.authSessions = sessions
}
// fingerprint derives a stable terminal hash from the device name. Client/app
// names are deliberately ignored so one phone/TV/PC using multiple apps is
// still counted as one terminal device; Client remains a login channel label.