Documentation
¶
Index ¶
- func NewEnforcer(model, fileAdapter, mysqlAdapter string) (*casbin.Enforcer, error)
- func NewPlugin() plugin.Plugin
- type Auth
- func (a *Auth) Commands() []*cli.Command
- func (a *Auth) Flags() []cli.Flag
- func (a *Auth) Handler() plugin.Handler
- func (a *Auth) HeaderSetUsername(r *http.Request, claims jwt.Claims)
- func (a *Auth) Init(ctx *cli.Context) error
- func (a *Auth) LoginHandler(h http.Handler) http.HandlerFunc
- func (a *Auth) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnforcer ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth def
func (*Auth) HeaderSetUsername ¶
HeaderSetUsername
func (*Auth) LoginHandler ¶
func (a *Auth) LoginHandler(h http.Handler) http.HandlerFunc
LoginHandler checkout token and get username.
Click to show internal directories.
Click to hide internal directories.