csrf

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Package__hfr5jb = &core.Package{
		PackageName: "namespacelabs.dev/foundation/std/go/http/csrf",
	}

	Provider__hfr5jb = core.Provider{
		Package:     Package__hfr5jb,
		Instantiate: makeDeps__hfr5jb,
	}

	Initializers__hfr5jb = []*core.Initializer{
		{
			Package: Package__hfr5jb,
			Do: func(ctx context.Context, di core.Dependencies) error {
				return di.Instantiate(ctx, Provider__hfr5jb, func(ctx context.Context, v interface{}) error {
					return Prepare(ctx, v.(ExtensionDeps))
				})
			},
		},
	}
)

Functions

func Prepare

func Prepare(ctx context.Context, deps ExtensionDeps) error

func Protect

func Protect(h http.HandlerFunc) http.Handler

Types

type ExtensionDeps

type ExtensionDeps struct {
	Token *secrets.Value
}

Dependencies that are instantiated once for the lifetime of the extension.

Jump to

Keyboard shortcuts

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