middleware

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 11

Documentation

Index

Constants

View Source
const TumblerContextKey contextKey = "tumbler"

SessionContextKey is the context key for the Login Session

Variables

This section is empty.

Functions

func WithClaimsFromRequest

func WithClaimsFromRequest(w http.ResponseWriter, r *http.Request, run func(TumblerClaims))

Types

type TumblerClaims

type TumblerClaims struct {
	jwe.Claims

	// These must match up with their json attribute names to the identity/pkg/session/Session json id names
	IdentityID     uuid.UUID `json:"iid"`
	TenantID       uuid.UUID `json:"tid"`
	OrganizationID uuid.UUID `json:"oid"`
	CredentialID   uuid.UUID `json:"cid"`
}

func ClaimsFromRequest

func ClaimsFromRequest(r *http.Request) (*TumblerClaims, error)

func (*TumblerClaims) LogContext

func (s *TumblerClaims) LogContext() map[string]string

type TumblerConfig

type TumblerConfig struct {
	Keys webkeys.WebKeysConfig
}

type TumblerMiddleware

type TumblerMiddleware interface {
	Handler(h http.Handler) http.Handler
}

func NewTumblerMiddleware

func NewTumblerMiddleware(log logging.Logger, times stime.TimeService, jweService jwe.JWEService) (TumblerMiddleware, error)

func NewTumblerMiddlewareFromConfig

func NewTumblerMiddlewareFromConfig(log logging.Logger, times stime.TimeService, config TumblerConfig) (TumblerMiddleware, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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