auth

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPerm

func HasPerm(ctx context.Context, defaultPerms []Permission, perm Permission) bool

func PermissionedProxy

func PermissionedProxy(validPerms, defaultPerms []Permission, in interface{}, out interface{})

func WithPerm

func WithPerm(ctx context.Context, perms []Permission) context.Context

Types

type Handler

type Handler struct {
	Verify func(ctx context.Context, token string) ([]Permission, error)
	Next   http.HandlerFunc
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Permission

type Permission string

Jump to

Keyboard shortcuts

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