mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 07:13:50 +01:00
20 lines
546 B
Go
20 lines
546 B
Go
package auth
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/yusing/godoxy/internal/auth"
|
|
)
|
|
|
|
// @x-id "login"
|
|
// @Base /api/v1
|
|
// @Summary Login
|
|
// @Description Initiates the login process by redirecting the user to the provider's login page
|
|
// @Tags auth
|
|
// @Produce plain
|
|
// @Success 302 {string} string "Redirects to login page or IdP"
|
|
// @Failure 429 {string} string "Too Many Requests"
|
|
// @Router /auth/login [post]
|
|
func Login(c *gin.Context) {
|
|
auth.GetDefaultAuth().LoginHandler(c.Writer, c.Request)
|
|
}
|