chore: checkpoint 第一版
ci / verify (push) Canceled after 0s

This commit is contained in:
Codex Local
2026-09-06 17:04:11 +08:00
parent a8cdec98d1
commit 0c2151ace9
659 changed files with 185855 additions and 554 deletions
+3 -1
View File
@@ -13,6 +13,8 @@ import (
"net/http"
"strings"
"time"
"data-terminal-cloud/internal/deviceactivation"
)
const (
@@ -95,7 +97,7 @@ func (v *Verifier) Verify(request *http.Request) (Identity, error) {
}
return Identity{}, fmt.Errorf("lookup device identity: %w", err)
}
if identity.Status != "registered" || identity.TenantID == "" {
if identity.Status != "registered" || identity.TenantID == "" || !deviceactivation.AllowsDeviceAuthentication(identity.ActivationState) {
return Identity{}, ErrDeviceInactive
}
secret, err := v.secrets.Resolve(request.Context(), identity.CredentialRef)