contextdefinition

package
v0.0.0-...-29e199f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUserHeader        = "X-Auth-UserId"
	DefaultApplicationHeader = "X-Auth-ApplicationId"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHeadersConfiguration

type AuthHeadersConfiguration struct {
	// UserRequestHeader configure the auth header key of the user
	UserRequestHeader string
	// ApplicationRequestHeader configure the auth header key of the application
	ApplicationRequestHeader string
}

AuthHeadersConfiguration configure the auth headers of the requests

type ContextDefinition

type ContextDefinition interface {
	// DefineUser defines the user within the context of the request
	DefineUser(next http.Handler) http.Handler
	// DefineApplication defines the application within the context of the request
	DefineApplication(next http.Handler) http.Handler
	// DefineAction defines the action within the context of the request
	DefineAction(next http.Handler) http.Handler
}

ContextDefinition is a set of middleware functions to create middleware chains

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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