token_authorizer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenAuthorizer

type TokenAuthorizer struct{}

TokenAuthorizer authorizes tokens based on their scopes and permissions.

Permissions are fully-qualified, prefixed with the owning service ("<service>:<permission>"). Permission/scope examples:

  • "assets:assets.write"
  • "notifications:preferences.read"

Admin permission/scope examples:

  • "admin:assets:assets.write"
  • "admin:notifications:preferences.read"

A scope or permission entry matches when it equals the permission itself, its admin-prefixed form ("admin:<permission>"), or a service-level wildcard ("<service>:*" / "admin:<service>:*").

func New

func New() *TokenAuthorizer

func (*TokenAuthorizer) Authorize

func (a *TokenAuthorizer) Authorize(actor *authorization2.Actor, permissions ...string) error

Jump to

Keyboard shortcuts

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