web

package
v0.0.0-...-5eca219 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(pattern string, config *Config) http.Handler

func NewHandlerWithUnsecuredLocalAuthorization

func NewHandlerWithUnsecuredLocalAuthorization(pattern string, config *Config) http.Handler

NewHandlerWithUnsecuredLocalAuthorization processes requests with unsigned JWT tokens under the local principal's identity. Such tokens can be created by anyone without any secret knowledge.

Types

type Config

type Config struct {
	Server       api.Server
	Authority    string   // External domain name with optional port number.
	Origins      []string // Value "*" causes Origin header to be ignored.
	NonceStorage NonceChecker
	NewRequestID func(*http.Request) uint64
	Monitor      func(*event.Event, error)
}

Config for a web server.

func (*Config) Configured

func (c *Config) Configured() bool

type NonceChecker

type NonceChecker interface {
	CheckNonce(ctx context.Context, scope []byte, nonce string, expires time.Time) error
}

Directories

Path Synopsis
api
Package api contains definitions useful for accessing the HTTP and websocket APIs.
Package api contains definitions useful for accessing the HTTP and websocket APIs.
debug
Package debug contains functionality useful for accessing the instance debugging API via HTTP.
Package debug contains functionality useful for accessing the instance debugging API via HTTP.
internal
api

Jump to

Keyboard shortcuts

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