middleware

package
v0.13.14 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddContentType = contenttype.Add

AddContentType will add a secondary content type to a request. If no content type is sent by the client the default will be set, otherwise the client's content type will be used.

Deprecated: use github.com/gobuffalo/mw-contenttype#Add instead.

View Source
var ParameterExclusionList = paramlogger.ParameterExclusionList

ParameterExclusionList is the list of parameter names that will be filtered from the application logs (see maskSecrets). Important: this list will be used in case insensitive.

Deprecated: use github.com/gobuffalo/mw-paramlogger#ParameterExclusionList instead.

View Source
var PopTransaction = popmw.Transaction

PopTransaction is a piece of Buffalo middleware that wraps each request in a transaction. The transaction will automatically get committed if there's no errors and the response status code is a 2xx or 3xx, otherwise it'll be rolled back. It will also add a field to the log, "db", that shows the total duration spent during the request making database calls.

Deprecated: use github.com/gobuffalo/buffalo-pop/pop/popmw#Transaction instead.

View Source
var SetContentType = contenttype.Set

SetContentType on the request to desired type. This will override any content type sent by the client.

Deprecated: use github.com/gobuffalo/mw-contenttype#Set instead.

Functions

func ParameterLogger deprecated added in v0.8.1

func ParameterLogger(next buffalo.Handler) buffalo.Handler

ParameterLogger logs form and parameter values to the loggers

Deprecated: use github.com/gobuffalo/mw-paramlogger#ParameterLogger instead.

Types

This section is empty.

Directories

Path Synopsis
Package tokenauth provides jwt token authorisation middleware supports HMAC, RSA, ECDSA, RSAPSS algorithms uses github.com/dgrijalva/jwt-go for jwt implementation Setting Up tokenauth middleware Using tokenauth with defaults app.Use(tokenauth.New(tokenauth.Options{})) Specifying Signing method for JWT app.Use(tokenauth.New(tokenauth.Options{ SignMethod: jwt.SigningMethodRS256, })) By default the Key used is loaded from the JWT_SECRET or JWT_PUBLIC_KEY env variable depending on the SigningMethod used.
Package tokenauth provides jwt token authorisation middleware supports HMAC, RSA, ECDSA, RSAPSS algorithms uses github.com/dgrijalva/jwt-go for jwt implementation Setting Up tokenauth middleware Using tokenauth with defaults app.Use(tokenauth.New(tokenauth.Options{})) Specifying Signing method for JWT app.Use(tokenauth.New(tokenauth.Options{ SignMethod: jwt.SigningMethodRS256, })) By default the Key used is loaded from the JWT_SECRET or JWT_PUBLIC_KEY env variable depending on the SigningMethod used.

Jump to

Keyboard shortcuts

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