Documentation ¶
Overview ¶
认证模块
认证模块
认证模块
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAuthHandler ¶
Types ¶
type AuthHandlerInterface ¶
type AuthHandlerInterface interface { Init(config string) error IsTokenValid(token string, uid string) error }
var (
AuthHandle AuthHandlerInterface
)
func NewExampleAuthHandler ¶
func NewExampleAuthHandler() AuthHandlerInterface
func NewTestAuthHandler ¶
func NewTestAuthHandler() AuthHandlerInterface
type ExampleAuthHandler ¶
type ExampleAuthHandler struct {
DSN string
}
func (*ExampleAuthHandler) Init ¶
func (ah *ExampleAuthHandler) Init(config string) error
func (*ExampleAuthHandler) IsTokenValid ¶
func (ah *ExampleAuthHandler) IsTokenValid(token string, uid string) error
认证方法
type TestAuthHandler ¶
type TestAuthHandler struct { }
func (*TestAuthHandler) Init ¶
func (th *TestAuthHandler) Init(config string) error
func (*TestAuthHandler) IsTokenValid ¶
func (th *TestAuthHandler) IsTokenValid(token string, uid string) error
认证方法
Click to show internal directories.
Click to hide internal directories.