middleware

package
v0.0.0-...-055c0a6 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: MulanPSL-2.0 Imports: 9 Imported by: 0

README

审计中心中间件

使用方式: 需要提前加载认证中间件

	ws.Route(ws.GET("/{id}").To(h.DescribeUser).
		Metadata(label.Resource, "子账号").\
		Metadata(label.Auth, true).
		Metadata(label.Audit, true).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpAudit

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

func NewHttpAuditor

func NewHttpAuditor() (*HttpAudit, error)

给服务端提供的RESTful接口的 认证与鉴权中间件

func (*HttpAudit) GoRestfulAuditFunc

func (a *HttpAudit) GoRestfulAuditFunc(req *restful.Request, resp *restful.Response, next *restful.FilterChain)

是否开启权限的控制, 交给中间件使用方去觉得

Jump to

Keyboard shortcuts

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