Documentation ¶
Index ¶
- type LoginEvent
- type LogoutEvent
- type Manager
- func (m *Manager) Get(r *http.Request, w http.ResponseWriter) (user *User, err error)
- func (m *Manager) Login(r *http.Request, w http.ResponseWriter, user *User, duration time.Duration) (err error)
- func (m *Manager) Logout(user *User, r *http.Request, w http.ResponseWriter) (err error)
- func (m *Manager) Middleware(authenticator auth.Authenticator) clevergo.MiddlewareFunc
- func (m *Manager) RegisterOnAfterLogin(f func(*LoginEvent))
- func (m *Manager) RegisterOnAfterLogout(f func(*LogoutEvent))
- func (m *Manager) RegisterOnBeforeLogin(f func(*LoginEvent) error)
- func (m *Manager) RegisterOnBeforeLogout(f func(*LogoutEvent) error)
- func (m *Manager) SetSessionManager(manager *scs.SessionManager)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginEvent ¶
type LogoutEvent ¶
type LogoutEvent struct {
User *User
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func New ¶
func New(identityStore auth.IdentityStore) *Manager
func (*Manager) Middleware ¶
func (m *Manager) Middleware(authenticator auth.Authenticator) clevergo.MiddlewareFunc
func (*Manager) RegisterOnAfterLogin ¶
func (m *Manager) RegisterOnAfterLogin(f func(*LoginEvent))
func (*Manager) RegisterOnAfterLogout ¶
func (m *Manager) RegisterOnAfterLogout(f func(*LogoutEvent))
func (*Manager) RegisterOnBeforeLogin ¶
func (m *Manager) RegisterOnBeforeLogin(f func(*LoginEvent) error)
func (*Manager) RegisterOnBeforeLogout ¶
func (m *Manager) RegisterOnBeforeLogout(f func(*LogoutEvent) error)
func (*Manager) SetSessionManager ¶
func (m *Manager) SetSessionManager(manager *scs.SessionManager)
Click to show internal directories.
Click to hide internal directories.