middleware

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenKey        = contextKey("token")
	WriterKey       = contextKey("writer")
	LogDataKey      = contextKey("log_data")
	ProviderKey     = contextKey("provider")
	RefreshTokenKey = contextKey("refresh_token")
)

Variables

This section is empty.

Functions

func AttachLogData

func AttachLogData(next http.Handler) http.Handler

func AttachRefreshToken

func AttachRefreshToken(config *config.Config) func(http.Handler) http.Handler

func AttachResponse

func AttachResponse(next http.Handler) http.Handler

func Authenticated

func Authenticated(config *config.Config) func(http.Handler) http.Handler

Types

type LogData

type LogData struct {
	IP        string
	UserAgent string
}

Jump to

Keyboard shortcuts

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