auth

package
v0.0.0-...-6b47566 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAuth

func InitAuth(Config AuthConfig)

func InitCasbin

func InitCasbin(config AuthConfig)

Types

type Auth

type Auth struct {
	Service      *pkauth.Service
	AuthEnforcer *casbin.Enforcer
}
var AuthService *Auth

func (*Auth) AddResourceURL

func (a *Auth) AddResourceURL(url string, group string) bool

type AuthConfig

type AuthConfig struct {
	CredChecker     func(username string, password string) (ok bool, err error)
	MapClaimsToUser token.ClaimsUpdFunc
	Validator       token.ValidatorFunc
	Host            string
	ConfigDir       fs.FS
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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