This commit is contained in:
wjqserver 2025-03-18 21:53:59 +08:00
parent ac7e1e43b5
commit a92bbb7fb6
22 changed files with 685 additions and 316 deletions

View file

@ -1,11 +1,12 @@
package auth
import (
"context"
"fmt"
"ghproxy/config"
"github.com/WJQSERVER-STUDIO/go-utils/logger"
"github.com/gin-gonic/gin"
"github.com/cloudwego/hertz/pkg/app"
)
var (
@ -35,7 +36,7 @@ func Init(cfg *config.Config) {
logDebug("Auth Init")
}
func AuthHandler(c *gin.Context, cfg *config.Config) (isValid bool, err error) {
func AuthHandler(ctx context.Context, c *app.RequestContext, cfg *config.Config) (isValid bool, err error) {
if cfg.Auth.AuthMethod == "parameters" {
isValid, err = AuthParametersHandler(c, cfg)
return isValid, err