acpauth

package
v0.0.0-...-a7b5525 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Authorize(ctx context.Context, bearer string) error
}

Authorizer validates a bearer token extracted from the Authorization header.

func StaticTokenAuthorizer

func StaticTokenAuthorizer(token string) Authorizer

StaticTokenAuthorizer returns an Authorizer that accepts exactly token.

type AuthorizerFunc

type AuthorizerFunc func(ctx context.Context, bearer string) error

AuthorizerFunc lifts bare functions into Authorizer.

func (AuthorizerFunc) Authorize

func (f AuthorizerFunc) Authorize(ctx context.Context, bearer string) error

Authorize validates bearer using the wrapped function.

Jump to

Keyboard shortcuts

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