Feat rebrand armature (#43)
All checks were successful
All checks were successful
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user