authorization

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPermissionLength = 160
	MaxRoleKeyLength    = 63
)

Variables

This section is empty.

Functions

func CanonicalScope

func CanonicalScope(applicationID string, workspaceID *string, permission string) (string, error)

func Intersect added in v0.6.2

func Intersect(left, right []string) []string

Intersect returns only scopes covered by both sets, retaining the narrower path for overlapping trailing wildcards. An empty set never grants access.

func Match

func Match(granted, wanted string) bool

func RoleMarker

func RoleMarker(applicationID string, workspaceID *string, roleKey string) (string, error)

func ValidateRelativePermission

func ValidateRelativePermission(value string) error

ValidateRelativePermission accepts only canonical, colon-delimited permission keys.

func ValidateRoleKey

func ValidateRoleKey(value string) error

func ValidateScopeClaim

func ValidateScopeClaim(scope, applicationID string) error

ValidateScopeClaim rejects non-canonical serialization as well as invalid paths.

func ValidateScopeValues

func ValidateScopeValues(values []string, applicationID string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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