authorization

package
v0.0.0-...-d18dbcb Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAuthorizer

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

func NewAPIAuthorizer

func NewAPIAuthorizer() *APIAuthorizer

func (*APIAuthorizer) Can

func (a *APIAuthorizer) Can(subject APIKeySubject, resource BrowserResource, action string) bool

type APIKeySubject

type APIKeySubject struct {
	AppID     string
	Roles     []string
	CanRead   bool
	CanWrite  bool
	CanDelete bool
}

func (APIKeySubject) GetRoles

func (s APIKeySubject) GetRoles() []string

type BrowserResource

type BrowserResource struct {
	AppID string
}

type OwnedResource

type OwnedResource struct {
	OwnerUserID string
}

type WebAuthorizer

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

func NewWebAuthorizer

func NewWebAuthorizer() *WebAuthorizer

func (*WebAuthorizer) Can

func (a *WebAuthorizer) Can(subject WebSubject, resource OwnedResource, action string) bool

type WebSubject

type WebSubject struct {
	UserID string
	Roles  []string
}

func (WebSubject) GetRoles

func (s WebSubject) GetRoles() []string

Jump to

Keyboard shortcuts

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