headerInjection

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMiddleware

func CreateMiddleware(config Config) func(next http.Handler) http.Handler

Types

type ClaimType

type ClaimType int
const (
	Name ClaimType = iota
	FamilyName
	GivenName
	MiddleName
	Nickname
	PreferredUsername
	Profile
	Picture
	Website
	Gender
	Birthdate
	Zoneinfo
	Locale
	UpdatedAt
	Email
	EmailVerified
	Address
	PhoneNumber
	PhoneNumberVerified
)

type Config

type Config struct {
	Request  []headerInjector
	Response []headerInjector
}

type ConfigSchema

type ConfigSchema struct {
	Request  []HeaderSchema `json:"request"`
	Response []HeaderSchema `json:"response"`
}

func (*ConfigSchema) CreateConfig

func (s *ConfigSchema) CreateConfig() Config

func (*ConfigSchema) Validate

func (s *ConfigSchema) Validate() error

type HeaderSchema

type HeaderSchema struct {
	Name   string   `json:"name"`
	Type   string   `json:"type"`
	Values []string `json:"values"`
}

Jump to

Keyboard shortcuts

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