middleware

package
v2.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: OSL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferrerRedirectStrategy = "referrer"
	PathRedirectStrategy     = "path"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RedirectUrlMaker

type RedirectUrlMaker interface {
	URL(context.Context, string) (*url.URL, error)
}

type SecurityMiddleware

type SecurityMiddleware struct {
	// contains filtered or unexported fields
}

func (*SecurityMiddleware) HandleIfGranted

func (m *SecurityMiddleware) HandleIfGranted(action router.Action, permission string) router.Action

func (*SecurityMiddleware) HandleIfGrantedWithFallback

func (m *SecurityMiddleware) HandleIfGrantedWithFallback(action router.Action, fallback router.Action, permission string) router.Action

func (*SecurityMiddleware) HandleIfLoggedIn

func (m *SecurityMiddleware) HandleIfLoggedIn(action router.Action) router.Action

func (*SecurityMiddleware) HandleIfLoggedOut

func (m *SecurityMiddleware) HandleIfLoggedOut(action router.Action) router.Action

func (*SecurityMiddleware) HandleIfNotGranted

func (m *SecurityMiddleware) HandleIfNotGranted(action router.Action, permission string) router.Action

func (*SecurityMiddleware) HandleIfNotGrantedWithFallback

func (m *SecurityMiddleware) HandleIfNotGrantedWithFallback(action router.Action, fallback router.Action, permission string) router.Action

func (*SecurityMiddleware) Inject

func (m *SecurityMiddleware) Inject(r *web.Responder, s application.SecurityService, u RedirectUrlMaker, l flamingo.Logger, cfg *struct {
	LoginPathHandler              string `inject:"config:security.loginPath.handler"`
	LoginPathRedirectStrategy     string `inject:"config:security.loginPath.redirectStrategy"`
	LoginPathRedirectPath         string `inject:"config:security.loginPath.redirectPath"`
	AuthenticatedHomepageStrategy string `inject:"config:security.authenticatedHomepage.strategy"`
	AuthenticatedHomepagePath     string `inject:"config:security.authenticatedHomepage.path"`
	EventLogging                  bool   `inject:"config:security.eventLogging"`
})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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