auth

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

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 17 Imported by: 2

README

认证中间件

基于RPC进行封装, 封装完后,给内部服务直接使用

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcAuthUnaryServerInterceptor

func GrpcAuthUnaryServerInterceptor() grpc.UnaryServerInterceptor

GrpcAuthUnaryServerInterceptor returns a new unary server interceptor for auth.

Types

type HttpAuther

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

func NewHttpAuther

func NewHttpAuther() (*HttpAuther, error)

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

func (*HttpAuther) GoRestfulAuthFunc

func (a *HttpAuther) GoRestfulAuthFunc(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