auth

package
v0.0.0-...-5dba8c9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2015 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

认证模块

认证模块

认证模块

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(msg *message.Container) error

认证方法

func Register

func Register(name string, authHandler authHandlerType)

func SetAuthHandler

func SetAuthHandler(adapter string, config string) error

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

认证方法

Jump to

Keyboard shortcuts

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