Documentation ¶
Index ¶
- func NewAuthentication(hctx http2.HttpHandlerContext, authOption AuthOption) func(next http.Handler) http.Handler
- func NewBasicAuth(hctx http2.HttpHandlerContext, definedUsername, definedPassword string) func(next http.Handler) http.Handler
- func NewHeaderCheck(hctx http2.HttpHandlerContext, secretKey string) func(next http.Handler) http.Handler
- func NewJWT(hctx http2.HttpHandlerContext, signKey []byte) func(next http.Handler) http.Handler
- func NewPaseto(hctx http2.HttpHandlerContext, publicKey string) func(next http.Handler) http.Handler
- type AuthOption
- type ConfigOpts
- type Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthentication ¶
func NewAuthentication(hctx http2.HttpHandlerContext, authOption AuthOption) func(next http.Handler) http.Handler
Middleware authentication supports jwt or basic auth
func NewBasicAuth ¶
func NewHeaderCheck ¶
Types ¶
type AuthOption ¶
type ConfigOpts ¶
type ConfigOpts func(s *http2.PerkakasHttpHandler)
type Header ¶
type Header struct { XKtbsRequestID string `valid:"uuidv4,required"` XKtbsAPIVersion string `valid:"semver,required"` XKtbsClientVersion string `valid:"semver,required"` XKtbsPlatformName string `valid:"required"` XKtbsClientName string `valid:"required"` // Optional XKtbsSignature string `valid:"optional"` XKtbsTime string `valid:"int,optional"` Authorization string `valid:"optional"` }
Click to show internal directories.
Click to hide internal directories.