permissions

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 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

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

func HasOneOf

func HasOneOf(resolvers ...Resolver) *RequireOneOf

func (*RequireOneOf) IsAllowed

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

type RequirePartiallyAuthenticated

type RequirePartiallyAuthenticated struct{}

func IsPartiallyAuthenticated

func IsPartiallyAuthenticated() *RequirePartiallyAuthenticated

func (*RequirePartiallyAuthenticated) IsAllowed

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