authz

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JWTKeyAuditContext string = "audit_context"
)

Variables

View Source
var DependencySet = wire.NewSet(
	NewLogger,
	wire.Struct(new(Middleware), "*"),
	wire.Struct(new(Adder), "*"),
)

Functions

func GetAdminAuthzAudit

func GetAdminAuthzAudit(ctx context.Context) interface{}

func WithAdminAuthzAudit

func WithAdminAuthzAudit(ctx context.Context, content interface{}) context.Context

Types

type Adder

type Adder struct {
	Clock clock.Clock
}

func (*Adder) AddAuthz

func (a *Adder) AddAuthz(
	auth config.AdminAPIAuth,
	appID config.AppID,
	authKey *config.AdminAPIAuthKey,
	auditContext interface{},
	hdr http.Header) (err error)

type Logger

type Logger struct{ *log.Logger }

func NewLogger

func NewLogger(lf *log.Factory) Logger

type Middleware

type Middleware struct {
	Logger  Logger
	Auth    config.AdminAPIAuth
	AppID   config.AppID
	AuthKey *config.AdminAPIAuthKey
	Clock   clock.Clock
}

func (*Middleware) Handle

func (m *Middleware) Handle(next http.Handler) http.Handler

type T

type T struct {
	AuditContext interface{}
}

Jump to

Keyboard shortcuts

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