middlewarex

package
v0.0.0-...-6d7266f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AntiReplyMiddleware

type AntiReplyMiddleware struct {
}

func NewAntiReplyMiddleware

func NewAntiReplyMiddleware() *AntiReplyMiddleware

func (*AntiReplyMiddleware) Handle

防重放

type CtxMetaMiddleware

type CtxMetaMiddleware struct {
}

func NewCtxMetaMiddleware

func NewCtxMetaMiddleware() *CtxMetaMiddleware

func (*CtxMetaMiddleware) Handle

将http header 放入 ctx 里面使用 metadata 保存.

type JwtTokenMiddleware

type JwtTokenMiddleware struct {
	// contains filtered or unexported fields
}

func NewJwtTokenMiddleware

func NewJwtTokenMiddleware(verifier TokenVerifier) *JwtTokenMiddleware

func (*JwtTokenMiddleware) Handle

type OperationMiddleware

type OperationMiddleware struct {
	// contains filtered or unexported fields
}

func NewOperationMiddleware

func NewOperationMiddleware(holder *rbacx.RbacHolder, sr syslogrpc.SyslogRpc) *OperationMiddleware

func (*OperationMiddleware) Handle

type SignTokenMiddleware

type SignTokenMiddleware struct {
}

func NewSignTokenMiddleware

func NewSignTokenMiddleware() *SignTokenMiddleware

func (*SignTokenMiddleware) Handle

未登录token 未登录时,token = md5(tm,ts)

type TimeTokenMiddleware

type TimeTokenMiddleware struct {
}

func NewTimeTokenMiddleware

func NewTimeTokenMiddleware() *TimeTokenMiddleware

func (*TimeTokenMiddleware) Handle

未登录token 未登录时,token = md5(tm,ts)

type TokenVerifier

type TokenVerifier interface {
	VerifyToken(ctx context.Context, token string, uid string) (jwt.MapClaims, error)
}

Jump to

Keyboard shortcuts

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