authplus

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = "default"

Functions

func InitAuthPlus

func InitAuthPlus(allows []string)

func Register

func Register(name string, provider AuthPlus)

服务启动前注册有的鉴权插件

func Unregister

func Unregister(name string)

Types

type AuthPlus

type AuthPlus interface {
	//Verify  校验
	// param: authData 认证数据
	// return:
	//        d: 继续校验的认证数据
	//        continueAuth:true:成功,false:继续校验
	//        err != nil: 校验失败
	Verify(authData []byte) (d []byte, continueAuth bool, err error) // 客户端自己验证时,忽略continueAuth
}

func NewDefaultAuth

func NewDefaultAuth() AuthPlus

type Manager

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

鉴权管理器,无需枷锁,保持无状态就行

func NewManager

func NewManager(providerName string) (*Manager, error)

func (*Manager) Verify

func (this *Manager) Verify(authData []byte) (d []byte, continueAuth bool, err error)

Jump to

Keyboard shortcuts

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