Documentation ¶
Index ¶
- func GetRequestID(r *http.Request) string
- type AuthMiddleware
- func (m AuthMiddleware) Authenticate(w http.ResponseWriter, r *http.Request) (caddyauth.User, bool, error)
- func (AuthMiddleware) CaddyModule() caddy.ModuleInfo
- func (m *AuthMiddleware) Provision(ctx caddy.Context) error
- func (m *AuthMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)
- func (m *AuthMiddleware) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
Authorizer *authz.Authorizer `json:"authorizer,omitempty" xml:"authorizer,omitempty" yaml:"authorizer,omitempty"`
}
AuthMiddleware authorizes access to endpoints based on the presense and content of JWT token.
func (AuthMiddleware) Authenticate ¶
func (m AuthMiddleware) Authenticate(w http.ResponseWriter, r *http.Request) (caddyauth.User, bool, error)
Authenticate authorizes access based on the presense and content of JWT token.
func (AuthMiddleware) CaddyModule ¶
func (AuthMiddleware) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*AuthMiddleware) Provision ¶
func (m *AuthMiddleware) Provision(ctx caddy.Context) error
Provision provisions JWT authorization provider
func (*AuthMiddleware) UnmarshalCaddyfile ¶
func (m *AuthMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)
UnmarshalCaddyfile unmarshals a caddyfile
func (*AuthMiddleware) Validate ¶
func (m *AuthMiddleware) Validate() error
Validate implements caddy.Validator.
Click to show internal directories.
Click to hide internal directories.