feat: 优化web

This commit is contained in:
2026-04-23 18:58:13 +08:00
commit 544a2f3428
160 changed files with 27327 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
package oauth2
import "github.com/gin-gonic/gin"
// Handler 绑定 Gin 与 Service。
type Handler struct {
svc *Service
}
// NewHandler 构造。
func NewHandler(svc *Service) *Handler {
return &Handler{svc: svc}
}
// Authorize GET /oauth/authorize
func (h *Handler) Authorize(c *gin.Context) {
h.svc.Authorize(c)
}
// Token POST /oauth/token
func (h *Handler) Token(c *gin.Context) {
h.svc.Token(c)
}
// Introspect POST /oauth/introspect
func (h *Handler) Introspect(c *gin.Context) {
h.svc.Introspect(c)
}