Documentation ¶
Index ¶
- Constants
- type Basic
- type Form
- func (f *Form) Apply(next web.HandlerFunc) web.HandlerFunc
- func (f *Form) Login(validator FormValidator) web.HandlerFunc
- func (f *Form) LoginForm(validator func(name, pwd string) (ticket string, err error)) web.HandlerFunc
- func (f *Form) LoginJSON(validator func(name, pwd string) (ticket string, err error)) web.HandlerFunc
- func (f *Form) Logout(ctx web.Context) error
- type FormIdentifier
- type FormValidator
Constants ¶
View Source
const PkgName = "auxo.net.web.filter.auth"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶
Basic implements Basic authentication.
func (*Basic) Apply ¶
func (b *Basic) Apply(next web.HandlerFunc) web.HandlerFunc
Apply implements `web.Filter` interface.
type Form ¶
type Form struct { CookieName string // default '_u' CookieDomain string CookiePath string DefaultURL string Remember bool SlidingExpiration bool Timeout time.Duration Identifier FormIdentifier }
Form implements form authentication.
func NewForm ¶
func NewForm(identifier FormIdentifier) *Form
NewForm returns an Form authenticate filter.
func (*Form) Apply ¶
func (f *Form) Apply(next web.HandlerFunc) web.HandlerFunc
Apply implements `web.Filter` interface.
func (*Form) Login ¶
func (f *Form) Login(validator FormValidator) web.HandlerFunc
Login returns a handler for sign-in.
type FormIdentifier ¶
FormIdentifier defines a function to identify user ticket.
Click to show internal directories.
Click to hide internal directories.