Documentation
¶
Overview ¶
Package blockallowlist 提供基于黑白名单规则的服务鉴权插件实现
Index ¶
- Constants
- type BlockAllowListAuthenticator
- func (p *BlockAllowListAuthenticator) Authenticate(info *authenticator.AuthInfo) *authenticator.AuthResult
- func (p *BlockAllowListAuthenticator) Destroy() error
- func (p *BlockAllowListAuthenticator) Init(ctx *plugin.InitContext) error
- func (p *BlockAllowListAuthenticator) Name() string
- func (p *BlockAllowListAuthenticator) SetEngine(engine sdk.Engine)
- func (p *BlockAllowListAuthenticator) Type() common.Type
- type Config
Constants ¶
View Source
const PluginName = "blockAllowList"
PluginName 插件名称
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockAllowListAuthenticator ¶
type BlockAllowListAuthenticator struct {
*plugin.PluginBase
// contains filtered or unexported fields
}
BlockAllowListAuthenticator 黑白名单服务鉴权插件
func (*BlockAllowListAuthenticator) Authenticate ¶
func (p *BlockAllowListAuthenticator) Authenticate(info *authenticator.AuthInfo) *authenticator.AuthResult
Authenticate 黑白名单鉴权入口。规则获取失败或无规则时按通过处理。
func (*BlockAllowListAuthenticator) Destroy ¶
func (p *BlockAllowListAuthenticator) Destroy() error
Destroy 销毁插件
func (*BlockAllowListAuthenticator) Init ¶
func (p *BlockAllowListAuthenticator) Init(ctx *plugin.InitContext) error
Init 初始化插件
func (*BlockAllowListAuthenticator) Name ¶
func (p *BlockAllowListAuthenticator) Name() string
Name 插件名
func (*BlockAllowListAuthenticator) SetEngine ¶
func (p *BlockAllowListAuthenticator) SetEngine(engine sdk.Engine)
SetEngine 由 Proxy 在 SetRealPlugin 时注入 Engine 引用, 用于按需调用 SyncGetServiceRule 拉取规则。实现 authenticator.EngineSetter 接口。
func (*BlockAllowListAuthenticator) Type ¶
func (p *BlockAllowListAuthenticator) Type() common.Type
Type 插件类型
Click to show internal directories.
Click to hide internal directories.