module

package
v0.0.0-...-3c6562c Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleID = "com.example.custom-jwt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTModule

type JWTModule struct {
	SecretKey string `mapstructure:"secret_key"`

	Logger *zap.Logger
}

JWTModule is a module that signs outgoing requests with a JWT token based on the authentication information of the received request

func (*JWTModule) Middleware

func (m *JWTModule) Middleware(ctx core.RequestContext, next http.Handler)

func (*JWTModule) Module

func (m *JWTModule) Module() core.ModuleInfo

func (*JWTModule) OnOriginRequest

func (m *JWTModule) OnOriginRequest(request *http.Request, ctx core.RequestContext) (*http.Request, *http.Response)

func (*JWTModule) Provision

func (m *JWTModule) Provision(ctx *core.ModuleContext) error

Jump to

Keyboard shortcuts

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