authentication

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(conf *ec.Authentication, watcher *watcher.Watcher)

Types

type Authentication

type Authentication interface {
	AddWhitelist(path string, method string)
	RemoveWhitelist(path, method string)
	IsWhitelist(path string, method string) bool
	Auth(role, path, method string) bool
	GetRole(ctx context.Context) (string, error)
	Enforce() *casbin.Enforcer
	IsSkipRole(role string) bool
}

func Instance

func Instance() Authentication

Jump to

Keyboard shortcuts

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