mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
[优化] POW 系统接口方案
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/rain-kl/openflare/openflare-server/common"
|
||||
"github.com/rain-kl/openflare/openflare-server/service"
|
||||
)
|
||||
|
||||
// CapAuth wraps the core Cap middleware with OpenFlare's dynamic CapLoginEnabled configuration switch
|
||||
func CapAuth(scope string) gin.HandlerFunc {
|
||||
return service.CapManager.VerifyMiddleware(scope, func() bool {
|
||||
return common.CapLoginEnabled
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user