From f5bfea05723fdac4ff3863e0534525a8dca50f71 Mon Sep 17 00:00:00 2001 From: Deng Ming Date: Sun, 7 Apr 2024 17:01:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=B4=E9=9C=B2=20DefaultProvider=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session/global.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/session/global.go b/session/global.go index 321e961..93e1550 100644 --- a/session/global.go +++ b/session/global.go @@ -42,6 +42,10 @@ func SetDefaultProvider(sp Provider) { defaultProvider = sp } +func DefaultProvider() Provider { + return defaultProvider +} + func CheckLoginMiddleware() gin.HandlerFunc { return (&MiddlewareBuilder{sp: defaultProvider}).Build() }