middleware

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessToken

func AccessToken(opts ...Option) func(next http.Handler) http.Handler

AccessToken middleware is used to set the user from an x-access-token to the context

func OCSFormatCtx

func OCSFormatCtx(next http.Handler) http.Handler

OCSFormatCtx middleware is used to determine the content type from the format URL parameter passed in an ocs request. Defaults to XML

Types

type Option

type Option func(o *Options)

Option defines a single option function.

func Logger

func Logger(l log.Logger) Option

Logger provides a function to set the logger option.

func TokenManagerConfig

func TokenManagerConfig(cfg config.TokenManager) Option

TokenManagerConfig provides a function to set the token manger config option.

type Options

type Options struct {
	// Logger to use for logging, must be set
	Logger log.Logger
	// TokenManagerConfig for communicating with the reva token manager
	TokenManagerConfig config.TokenManager
}

Options defines the available options for this package.

Jump to

Keyboard shortcuts

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