Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticate ¶ added in v0.5.9
type Authenticate interface {
Type() string
Create(source Source, expireSeconds int64, opts ...Option) (Token, error)
Decode(source Source, token string, opts ...Option) (Token, error)
Check(source Source, token string, opts ...Option) (Token, error)
// EnableFlag return 0= disable, 1=enable, 2=not exist
EnableFlag(source Source) int
SetEnabled(source Source, enable bool)
}
type Route ¶ added in v0.5.11
type Route interface {
HasAuth(method string) bool
Auth() Authenticate
Use(a Authenticate) Route
}
type Session ¶
func CreateSession ¶ added in v1.2.20
Click to show internal directories.
Click to hide internal directories.