middleware

package
v0.0.0-...-f348597 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("Bad request")
View Source
var ErrNoToken = errors.New("No token")
View Source
var ErrWrongAuthType = errors.New("Wrong auth type")

Functions

func EnableCORS

func EnableCORS(w *http.ResponseWriter)

func GetAuthToken

func GetAuthToken(r *http.Request) (tkn string, err error)

func TokenPrehandler

func TokenPrehandler(w http.ResponseWriter, r *http.Request) (tkn string, next bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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