middleware

package
v0.0.0-...-36feab7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	core.Handler
	// contains filtered or unexported fields
}

Authentication is middleware used to authenticate HTTP requests.

func NewAuthentication

func NewAuthentication(alg gojwt.Algorithm) *Authentication

NewAuthentication returns a new instance of Authentication.

func (*Authentication) Handle

func (m *Authentication) Handle(h http.Handler) http.Handler

Handle returns a new http.Handler, used to authenticate the given handler.

type Cors

type Cors struct{}

Cors is middleware used to add CORS headers to the HTTP response.

func NewCors

func NewCors() *Cors

NewCors returns a new instance of Cors.

func (*Cors) Handle

func (*Cors) Handle(h http.Handler) http.Handler

Handle returns a new http.Handler which will add the CORS headers.

Jump to

Keyboard shortcuts

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