Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorInvalidAuth = errors.New("invalid auth")
)
Functions ¶
func FactoryRegister ¶
func FactoryRegister(key string, factory IAuthFactory)
FactoryRegister 注册auth工厂到默认auth工厂注册器
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type IAuthFactory ¶
type IAuthFactory interface { Create(tokenName string, position string, rule interface{}) (application.IAuth, error) Alias() []string Render() interface{} ConfigType() reflect.Type UserType() reflect.Type PreRouters() []*PreRouter }
IAuthFactory 鉴权工厂方法
func GetFactory ¶
func GetFactory(name string) (IAuthFactory, error)
GetFactory 获取指定auth工厂,若指定的不存在则返回一个已注册的工厂
type IAuthFactoryRegister ¶
type IAuthFactoryRegister interface { RegisterFactoryByKey(key string, factory IAuthFactory) GetFactoryByKey(key string) (IAuthFactory, bool) Keys() []string Alias() map[string]string }
IAuthFactoryRegister 实现了鉴权工厂管理器
Click to show internal directories.
Click to hide internal directories.