authorization

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

type Guard struct {
	Persistence *persistence.Persistence
	// contains filtered or unexported fields
}

func NewGuard

func NewGuard(config configuration.Config, persistence *persistence.Persistence) *Guard

func (*Guard) Authorize

func (g *Guard) Authorize(checkR *Request) error

func (*Guard) AuthorizeList

func (g *Guard) AuthorizeList(checkR []*Request, parallel bool) []error

func (*Guard) IsAllowed

func (g *Guard) IsAllowed(ladonRequest *ladon.Request) error

type Request

type Request struct {
	UserId       string   `json:"userID"`
	Roles        []string `json:"roles"`
	Username     string   `json:"username"`
	ClientId     string   `json:"clientID"`
	TargetMethod string   `json:"target_method"`
	TargetUri    string   `json:"target_uri"`
}

Jump to

Keyboard shortcuts

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