mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
25w20a
This commit is contained in:
parent
ac7e1e43b5
commit
a92bbb7fb6
22 changed files with 685 additions and 316 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue