auth

package
v0.0.0-...-389294b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnforcer

func NewEnforcer(model, fileAdapter, mysqlAdapter string) (*casbin.Enforcer, error)

func NewPlugin

func NewPlugin() plugin.Plugin

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

Auth def

func (*Auth) Commands

func (a *Auth) Commands() []*cli.Command

func (*Auth) Flags

func (a *Auth) Flags() []cli.Flag

func (*Auth) Handler

func (a *Auth) Handler() plugin.Handler

func (*Auth) HeaderSetUsername

func (a *Auth) HeaderSetUsername(r *http.Request, claims jwt.Claims)

HeaderSetUsername

func (*Auth) Init

func (a *Auth) Init(ctx *cli.Context) error

func (*Auth) LoginHandler

func (a *Auth) LoginHandler(h http.Handler) http.HandlerFunc

LoginHandler checkout token and get username.

func (*Auth) String

func (a *Auth) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL