mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 15:23:51 +01:00
- These changes makes the API incombatible with previous versions - Added new types for error handling, success responses, and health checks. - Updated health check logic to utilize the new types for better clarity and structure. - Refactored existing handlers to improve response consistency and error handling. - Updated Makefile to include a new target for generating API types from Swagger. - Updated "new agent" API to respond an encrypted cert pair
19 lines
434 B
Go
19 lines
434 B
Go
package auth
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/yusing/go-proxy/internal/auth"
|
|
)
|
|
|
|
// @x-id "logout"
|
|
// @Base /api/v1
|
|
// @Summary Logout
|
|
// @Description Logs out the user by invalidating the token
|
|
// @Tags auth
|
|
// @Produce plain
|
|
// @Success 302 {string} string "Redirects to home page"
|
|
// @Router /auth/logout [post]
|
|
func Logout(c *gin.Context) {
|
|
auth.GetDefaultAuth().LogoutHandler(c.Writer, c.Request)
|
|
}
|