feat: adopt shared internal SSO sessions and add no-sso launch mode

This commit is contained in:
SantaSpeen committed 2026-10-24 15:41:39 +03:00
1 parent c209f1effc
commit c02bf755f2
51 files changed
+2131 -362

No files matched your search

+9 -2
View File
@@ -66,14 +66,21 @@ func TestWorkspaceBrowserQA(t *testing.T) {
}
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
r = authorizeTestRequest(r, testSession(1, "QA", true))
if r.URL.Path == "/api/session" {
if r.URL.Path == "/api/session" || r.URL.Path == "/auth/session" {
u, err := st.Users.Get(root, false, uint(1))
if err != nil {
http.Error(w, "user", 500)
return
}
u.DisplayName = "QA Account"
renderJSON(w, r, ssoUserInfo(u))
profile := ssoUserInfo(u)
profile.SessionState = "qa"
profile.AuthMode = "no-sso"
if r.URL.Path == "/auth/session" {
writeState(w, 200, browserState{Status: "authenticated", Authenticated: true, State: "qa", User: &profile})
} else {
renderJSON(w, r, profile)
}
return
}
handler.ServeHTTP(w, r)