guard

package
v0.0.0-...-c5966c3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionRead   Action = "R"
	ActionCreate Action = "C"
	ActionUpdate Action = "U"
	ActionDelete Action = "D"
)

func (Action) IsValid

func (a Action) IsValid() bool

func (Action) String

func (a Action) String() string

type AuthGuard

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

func New

func New(validator iam.Validator, enforcer iam.Enforcer) AuthGuard

func (AuthGuard) AuthenticateM2MMiddleware

func (guard AuthGuard) AuthenticateM2MMiddleware() lit.HandlerFunc

func (AuthGuard) AuthenticateUserMiddleware

func (guard AuthGuard) AuthenticateUserMiddleware() lit.HandlerFunc

func (AuthGuard) RequiredM2MScopeMiddleware

func (guard AuthGuard) RequiredM2MScopeMiddleware(scopes ...string) lit.HandlerFunc

func (AuthGuard) RolePermissionHandler

func (guard AuthGuard) RolePermissionHandler(handler lit.ErrHandlerFunc, resource string, permissions Action) lit.ErrHandlerFunc

Jump to

Keyboard shortcuts

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