From 89e92cbd47099e9c9e450b146f23fe939d8aa06b Mon Sep 17 00:00:00 2001 From: DacongDA Date: Tue, 3 Sep 2024 08:05:29 +0800 Subject: [PATCH] feat: when using basic auth to fetch access_token will return restful response to oidc client (#3164) --- routers/auto_signin_filter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routers/auto_signin_filter.go b/routers/auto_signin_filter.go index ea4a522b..20223c5f 100644 --- a/routers/auto_signin_filter.go +++ b/routers/auto_signin_filter.go @@ -16,6 +16,7 @@ package routers import ( "fmt" + "strings" "github.com/beego/beego/context" "github.com/casdoor/casdoor/object" @@ -23,6 +24,10 @@ import ( ) func AutoSigninFilter(ctx *context.Context) { + urlPath := ctx.Request.URL.Path + if strings.HasPrefix(urlPath, "/api/login/oauth/access_token") { + return + } //if getSessionUser(ctx) != "" { // return //}