Skip to content

Commit

Permalink
暴露 DefaultProvider 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
flycash committed Apr 7, 2024
1 parent 4d5f4e3 commit 53f744f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions session/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func SetDefaultProvider(sp Provider) {
defaultProvider = sp
}

func DefaultProvider() Provider {
return defaultProvider
}

func CheckLoginMiddleware() gin.HandlerFunc {
return (&MiddlewareBuilder{sp: defaultProvider}).Build()
}
Expand Down

0 comments on commit 53f744f

Please sign in to comment.