middleware

package
v1.6.36 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetDatasets = func(ctx context.Context) []string {
	datasets := ctx.Value("datasets")
	if datasets == nil {
		log.Debug("request datasets context is empty")
		return []string{}
	}
	log.Debugf("returning %v from request context", datasets)
	return datasets.([]string)
}

GetDatasets extracts the dataset list from the request context

Functions

func TokenMiddleware

func TokenMiddleware(nextHandler http.Handler) http.Handler

TokenMiddleware performs access token verification and validation JWTs are verified and validated by the app, opaque tokens are sent to AAI for verification Successful auth results in list of authorised datasets

Types

This section is empty.

Jump to

Keyboard shortcuts

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