package
Version:
v0.0.0-...-5259590
Opens a new window with list of versions in this module.
Published: Feb 19, 2024
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
func NewAuthFilter(service string) restful.FilterFunction
func (a *Auth) Filter(
req *restful.Request,
w *restful.Response,
next *restful.FilterChain)
业务功能
- 需要rpc客户端,采用全局变量来进行设计
- rpc ValidateToken 来进行鉴权
2.1 token存放位置: cookie(web)/header(Authentication)/query(websocket)参数
2.2 校验 成功 paas,失败: 中断流程 返回认证错误(401)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.