Feat rebrand armature (#43)
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m34s
CI/CD / test-sqlite (push) Successful in 2m46s
CI/CD / build-and-deploy (push) Successful in 1m55s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #43.
This commit is contained in:
2026-03-31 23:25:37 +00:00
committed by xcaliber
parent fb5284f667
commit 680ec3b897
321 changed files with 956 additions and 1033 deletions

View File

@@ -17,11 +17,11 @@ import (
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
"switchboard-core/auth"
"switchboard-core/config"
"switchboard-core/crypto"
"switchboard-core/models"
"switchboard-core/store"
"armature/auth"
"armature/config"
"armature/crypto"
"armature/models"
"armature/store"
)
// Claims represents the JWT payload.
@@ -153,8 +153,8 @@ func (h *AuthHandler) Logout(c *gin.Context) {
h.uekCache.Evict(userID.(string))
}
// Clear the sb_token cookie so SSR middleware doesn't trust a stale token
c.SetCookie("sb_token", "", -1, "/", "", false, false)
// Clear the arm_token cookie so SSR middleware doesn't trust a stale token
c.SetCookie("arm_token", "", -1, "/", "", false, false)
c.JSON(http.StatusOK, gin.H{"message": "logged out"})
}
@@ -287,7 +287,7 @@ func (h *AuthHandler) OIDCCallback(c *gin.Context) {
userJSON, _ := json.Marshal(tokens["user"])
// Set page-auth cookie too (for SSR middleware)
c.SetCookie("sb_token", accessToken, 900, "/", "", false, false)
c.SetCookie("arm_token", accessToken, 900, "/", "", false, false)
// Base64-encode the token payload for the fragment
payload := fmt.Sprintf(`{"access_token":"%s","refresh_token":"%s","user":%s}`,
@@ -517,7 +517,7 @@ func BootstrapAdmin(cfg *config.Config, s store.Stores, uekCache ...*crypto.UEKC
email := cfg.AdminEmail
if email == "" {
email = cfg.AdminUsername + "@switchboard.local"
email = cfg.AdminUsername + "@armature.local"
}
handle := auth.UniqueHandle(ctx, s.Users, models.HandleFromName(cfg.AdminUsername))
@@ -612,7 +612,7 @@ func SeedUsers(cfg *config.Config, s store.Stores, uekCache ...*crypto.UEKCache)
handle := auth.UniqueHandle(ctx, s.Users, models.HandleFromName(username))
user := &models.User{
Username: username,
Email: username + "@switchboard.local",
Email: username + "@armature.local",
PasswordHash: string(hash),
IsActive: true,
AuthSource: "builtin",