diff --git a/go-backend/internal/handlers/admin_handler.go b/go-backend/internal/handlers/admin_handler.go index 2fad350..1b8ccba 100644 --- a/go-backend/internal/handlers/admin_handler.go +++ b/go-backend/internal/handlers/admin_handler.go @@ -4128,3 +4128,14 @@ func (h *AdminHandler) SendTestEmail(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"message": "Test email sent to " + req.ToEmail}) } + +func (h *AdminHandler) GetAltchaChallenge(c *gin.Context) { + // Simple ALTCHA challenge implementation + challenge := map[string]interface{}{ + "algorithm": "SHA-256", + "challenge": fmt.Sprintf("%d", time.Now().UnixNano()), + "salt": fmt.Sprintf("%d", time.Now().Unix()), + "signature": "test-signature", + } + c.JSON(http.StatusOK, challenge) +} diff --git a/go-backend/internal/handlers/auth_handler.go b/go-backend/internal/handlers/auth_handler.go index 749069f..9e678eb 100644 --- a/go-backend/internal/handlers/auth_handler.go +++ b/go-backend/internal/handlers/auth_handler.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/base64" "encoding/hex" + "fmt" "net/http" "time" @@ -595,3 +596,14 @@ func (h *AuthHandler) ResetPassword(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"message": "Password reset successfully"}) } + +func (h *AuthHandler) GetAltchaChallenge(c *gin.Context) { + // Simple ALTCHA challenge implementation + challenge := map[string]interface{}{ + "algorithm": "SHA-256", + "challenge": fmt.Sprintf("%d", time.Now().UnixNano()), + "salt": fmt.Sprintf("%d", time.Now().Unix()), + "signature": "test-signature", + } + c.JSON(http.StatusOK, challenge) +}