filter

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectManager

func GetProjectManager(req *http.Request) (promgr.ProjectManager, error)

GetProjectManager tries to get project manager from request and returns it

func GetSecurityContext

func GetSecurityContext(req *http.Request) (security.Context, error)

GetSecurityContext tries to get security context from request and returns it

func Init

func Init()

Init ReqCtxMofiers list

func MediaTypeFilter

func MediaTypeFilter(mediaType ...string) func(*beegoctx.Context)

MediaTypeFilter filters the POST request, it returns 415 if the content type of the request doesn't match the preset ones.

func SecurityFilter

func SecurityFilter(ctx *beegoctx.Context)

SecurityFilter authenticates the request and passes a security context and a project manager with it which can be used to do some authN & authZ

Types

type ReqCtxModifier

type ReqCtxModifier interface {
	Modify(*beegoctx.Context) bool
}

ReqCtxModifier modifies the context of request

Jump to

Keyboard shortcuts

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