permissions

package
v0.24.412 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminPermission                 = "ADMIN"
	AuthenticatedPermission         = "AUTHENTICATED"
	PartiallyAuthenticatePermission = "PARTIAL_AUTH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlwaysAllow

type AlwaysAllow struct{}

func Always

func Always() *AlwaysAllow

func (*AlwaysAllow) IsAllowed

func (a *AlwaysAllow) IsAllowed(_ ...string) bool

type RequireAdmin

type RequireAdmin struct{}

func IsAdmin

func IsAdmin() *RequireAdmin

func (*RequireAdmin) IsAllowed

func (ia *RequireAdmin) IsAllowed(identityPerms ...string) bool

type RequireAll

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

func NewRequireAll

func NewRequireAll(perms ...string) *RequireAll

func (*RequireAll) IsAllowed

func (ra *RequireAll) IsAllowed(identityPerms ...string) bool

type RequireAuthenticated

type RequireAuthenticated struct{}

func IsAuthenticated

func IsAuthenticated() *RequireAuthenticated

func (*RequireAuthenticated) IsAllowed

func (ir *RequireAuthenticated) IsAllowed(identityPerms ...string) bool

type RequireOne

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

func NewRequireOne

func NewRequireOne(perms ...string) *RequireOne

func (*RequireOne) IsAllowed

func (ro *RequireOne) IsAllowed(identityPerms ...string) bool

type RequireOneOf added in v0.17.52

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

func HasOneOf added in v0.17.52

func HasOneOf(resolvers ...Resolver) *RequireOneOf

func (*RequireOneOf) IsAllowed added in v0.17.52

func (ia *RequireOneOf) IsAllowed(identityPerms ...string) bool

type RequirePartiallyAuthenticated added in v0.17.52

type RequirePartiallyAuthenticated struct{}

func IsPartiallyAuthenticated added in v0.17.52

func IsPartiallyAuthenticated() *RequirePartiallyAuthenticated

func (*RequirePartiallyAuthenticated) IsAllowed added in v0.17.52

func (ir *RequirePartiallyAuthenticated) IsAllowed(identityPerms ...string) bool

type Resolver

type Resolver interface {
	IsAllowed(...string) bool
}

Jump to

Keyboard shortcuts

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