auth

package
v0.0.0-...-5259590 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthFilter

func NewAuthFilter(service string) restful.FilterFunction

Types

type Auth

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

func NewAuth

func NewAuth(c *rpc.Client, service string) *Auth

func (*Auth) Filter

func (a *Auth) Filter(
	req *restful.Request,
	w *restful.Response,
	next *restful.FilterChain)

业务功能

  1. 需要rpc客户端,采用全局变量来进行设计
  2. rpc ValidateToken 来进行鉴权 2.1 token存放位置: cookie(web)/header(Authentication)/query(websocket)参数 2.2 校验 成功 paas,失败: 中断流程 返回认证错误(401)

Jump to

Keyboard shortcuts

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