auth

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(plugin Plugin) *Handler

func (*Handler) Handler

func (h *Handler) Handler(chain http.Handler) http.Handler

type Plugin

type Plugin interface {
	// Name gets the name of the plugin
	Name() string

	// InitConfig initializes the set of configuration options that are valid, with defaults. Called on all plugins.
	InitConfig(config config.Section)

	// Init initializes the plugin, with configuration
	Init(ctx context.Context, name string, config config.Section) error

	// Authorize is the authorizer function. If it returns nil, the request proceeds. If it returns an error,
	// the request is rejected with that error message and corresponding HTTP status code
	Authorize(ctx context.Context, req *fftypes.AuthReq) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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