middleware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("error: unable to authorize user")
View Source
var RealmMessage = `Authentication required for API access to workflow db connector`

Functions

func BasicAuth

func BasicAuth(next http.Handler) http.Handler

BasicAuth reads the stored username and password info from the config file and returns a negroni middleware implementing HTTP Basic Authentication

func RequestInjector

func RequestInjector(next http.Handler) http.Handler

RequestInjector will add necessary key value pairs to the context in request that will be used later

func ResponseInjector

func ResponseInjector(next http.Handler) http.Handler

ResponseInjector will add security parameters to the response header

func RouteChecker

func RouteChecker(next http.Handler) http.Handler

RouteChecker checks to make sure that the type descriptor key provided by the user actually matches to a database table name

Types

This section is empty.

Jump to

Keyboard shortcuts

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